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

@ -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