Commit path stuff.

This commit is contained in:
Andrey Antukh 2016-08-10 20:04:55 +03:00
parent 52b0900325
commit 398f08fac7
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -19,7 +19,7 @@
[uxbox.util.data :refer (parse-int)] [uxbox.util.data :refer (parse-int)]
[uxbox.main.ui.keyboard :as kbd] [uxbox.main.ui.keyboard :as kbd]
[uxbox.main.ui.shapes :as uus] [uxbox.main.ui.shapes :as uus]
[uxbox.main.ui.shapes.path :as spath] ;; [uxbox.main.ui.shapes.path :as spath]
[uxbox.util.mixins :as mx :include-macros true] [uxbox.util.mixins :as mx :include-macros true]
[uxbox.main.ui.workspace.base :as wb] [uxbox.main.ui.workspace.base :as wb]
[uxbox.main.ui.workspace.rlocks :as rlocks] [uxbox.main.ui.workspace.rlocks :as rlocks]
@ -42,18 +42,18 @@
;; --- Canvas ;; --- Canvas
(def ^:private test-path-shape ;; (def ^:private test-path-shape
{:type :path ;; {:type :path
:id #uuid "042951a0-804a-4cf1-b606-3e97157f55b5" ;; :id #uuid "042951a0-804a-4cf1-b606-3e97157f55b5"
:stroke-type :solid ;; :stroke-type :solid
:stroke "#000000" ;; :stroke "#000000"
:stroke-width 2 ;; :stroke-width 2
:fill "transparent" ;; :fill "transparent"
:close? true ;; :close? true
:points [(gpt/point 100 100) ;; :points [(gpt/point 100 100)
(gpt/point 300 100) ;; (gpt/point 300 100)
(gpt/point 200 300) ;; (gpt/point 200 300)
]}) ;; ]})
(mx/defc canvas (mx/defc canvas
{:mixins [mx/reactive]} {:mixins [mx/reactive]}
@ -71,7 +71,7 @@
(for [item (reverse (:shapes page))] (for [item (reverse (:shapes page))]
(-> (uus/shape item) (-> (uus/shape item)
(mx/with-key (str item)))) (mx/with-key (str item))))
(spath/path-component test-path-shape) ;; (spath/path-component test-path-shape)
(selection-handlers) (selection-handlers)
(draw-area)]]])) (draw-area)]]]))