mirror of
https://github.com/penpot/penpot.git
synced 2025-06-13 17:21:39 +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
|
@ -14,8 +14,9 @@
|
|||
[uxbox.main.ui.shapes.common :as common]
|
||||
[uxbox.main.ui.shapes.attrs :as attrs]
|
||||
[uxbox.main.data.images :as udi]
|
||||
[uxbox.util.mixins :as mx :include-macros true]
|
||||
[uxbox.util.geom.matrix :as gmt]))
|
||||
[uxbox.util.data :refer [classnames]]
|
||||
[uxbox.util.geom.matrix :as gmt]
|
||||
[uxbox.util.mixins :as mx :include-macros true]))
|
||||
|
||||
;; --- Refs
|
||||
|
||||
|
@ -62,9 +63,11 @@
|
|||
resize (gmt/multiply resize)
|
||||
displacement (gmt/multiply displacement))
|
||||
|
||||
moving? (boolean displacement)
|
||||
props {:x x1 :y y1
|
||||
:id (str "shape-" id)
|
||||
:preserve-aspect-ratio "none"
|
||||
:class (classnames :move-cursor moving?)
|
||||
:xlink-href (:url image)
|
||||
:transform (str xfmt)
|
||||
:width width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue