mirror of
https://github.com/penpot/penpot.git
synced 2025-06-10 05:11:38 +02:00
Add move cursor when shape is displaced on viewport.
This commit is contained in:
parent
4dc728378c
commit
99f935863a
9 changed files with 50 additions and 18 deletions
|
@ -7,12 +7,13 @@
|
|||
(ns uxbox.main.ui.shapes.path
|
||||
(:require [potok.core :as ptk]
|
||||
[cuerdas.core :as str :include-macros true]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.main.store :as st]
|
||||
[uxbox.main.refs :as refs]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.main.data.shapes :as uds]
|
||||
[uxbox.main.geom :as geom]
|
||||
[uxbox.util.data :refer [classnames]]
|
||||
[uxbox.util.geom.matrix :as gmt]
|
||||
[uxbox.util.geom.point :as gpt]
|
||||
[uxbox.util.mixins :as mx :include-macros true]))
|
||||
|
@ -69,9 +70,14 @@
|
|||
shape (cond-> shape
|
||||
displacement (geom/transform displacement)
|
||||
resize (geom/transform resize))
|
||||
moving? (boolean displacement)
|
||||
|
||||
pdata (render-path shape)
|
||||
attrs (merge {:id (str id) :d pdata}
|
||||
(attrs/extract-style-attrs shape))]
|
||||
props {:id (str id)
|
||||
:class (classnames :move-cursor moving?)
|
||||
:d pdata}
|
||||
|
||||
attrs (merge (attrs/extract-style-attrs shape) props)]
|
||||
(if background?
|
||||
[:g {}
|
||||
[:path {:stroke "transparent"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue