Add move cursor when shape is displaced on viewport.

This commit is contained in:
Andrey Antukh 2017-03-01 19:13:10 +01:00
parent 4dc728378c
commit 99f935863a
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
9 changed files with 50 additions and 18 deletions

View file

@ -17,6 +17,7 @@
[uxbox.main.ui.shapes.text :as text]
[uxbox.main.ui.shapes.path :as path]
[uxbox.main.ui.shapes.image :as image]
[uxbox.util.data :refer [classnames]]
[uxbox.util.geom.matrix :as gmt]
[uxbox.util.mixins :as mx :include-macros true]))
@ -75,7 +76,9 @@
resize (gmt/multiply resize)
displacement (gmt/multiply displacement))
moving? (boolean displacement)
attrs {:id (str "shape-" id)
:class (classnames :move-cursor moving?)
:transform (str xfmt)}]
[:g attrs
(for [item (reverse items)