mirror of
https://github.com/penpot/penpot.git
synced 2025-02-11 01:28:30 -05:00
Remove printwritter impl on workspace events.
This commit is contained in:
parent
894836fa55
commit
34abb7eb27
1 changed files with 4 additions and 20 deletions
|
@ -48,11 +48,7 @@
|
||||||
rs/UpdateEvent
|
rs/UpdateEvent
|
||||||
(-apply-update [_ state]
|
(-apply-update [_ state]
|
||||||
(let [key (keyword (str (name toolname) "-enabled"))]
|
(let [key (keyword (str (name toolname) "-enabled"))]
|
||||||
(update-in state [:workspace key] (fnil not false))))
|
(update-in state [:workspace key] (fnil not false))))))
|
||||||
|
|
||||||
IPrintWithWriter
|
|
||||||
(-pr-writer [mv writer _]
|
|
||||||
(-write writer "#<event:u.d.w/toggle-tool>"))))
|
|
||||||
|
|
||||||
(defn toggle-toolbox
|
(defn toggle-toolbox
|
||||||
"Toggle the visibility flag of the specified toolbox."
|
"Toggle the visibility flag of the specified toolbox."
|
||||||
|
@ -74,11 +70,7 @@
|
||||||
(-apply-update [_ state]
|
(-apply-update [_ state]
|
||||||
(if shape
|
(if shape
|
||||||
(assoc-in state [:workspace :drawing] shape)
|
(assoc-in state [:workspace :drawing] shape)
|
||||||
(update-in state [:workspace] dissoc :drawing)))
|
(update-in state [:workspace] dissoc :drawing)))))
|
||||||
|
|
||||||
IPrintWithWriter
|
|
||||||
(-pr-writer [mv writer _]
|
|
||||||
(-write writer "#<event:u.d.w/select-for-drawing>"))))
|
|
||||||
|
|
||||||
(defn select-shape
|
(defn select-shape
|
||||||
"Mark a shape selected for drawing in the canvas."
|
"Mark a shape selected for drawing in the canvas."
|
||||||
|
@ -146,11 +138,7 @@
|
||||||
shape (merge shape props {:id sid :page pid})]
|
shape (merge shape props {:id sid :page pid})]
|
||||||
(as-> state $
|
(as-> state $
|
||||||
(update-in $ [:pages-by-id pid :shapes] conj sid)
|
(update-in $ [:pages-by-id pid :shapes] conj sid)
|
||||||
(assoc-in $ [:shapes-by-id sid] shape))))
|
(assoc-in $ [:shapes-by-id sid] shape))))))
|
||||||
|
|
||||||
IPrintWithWriter
|
|
||||||
(-pr-writer [mv writer _]
|
|
||||||
(-write writer "#<event:u.d.w/add-shape>"))))
|
|
||||||
|
|
||||||
(defn initialize
|
(defn initialize
|
||||||
"Initialize the workspace state."
|
"Initialize the workspace state."
|
||||||
|
@ -163,11 +151,7 @@
|
||||||
:drawing nil
|
:drawing nil
|
||||||
:selected #{}
|
:selected #{}
|
||||||
:page pageid}]
|
:page pageid}]
|
||||||
(assoc state :workspace s)))
|
(assoc state :workspace s)))))
|
||||||
|
|
||||||
IPrintWithWriter
|
|
||||||
(-pr-writer [mv writer _]
|
|
||||||
(-write writer "#<event:u.d.w/initialize>"))))
|
|
||||||
|
|
||||||
(defn move-shape
|
(defn move-shape
|
||||||
"Mark a shape selected for drawing in the canvas."
|
"Mark a shape selected for drawing in the canvas."
|
||||||
|
|
Loading…
Add table
Reference in a new issue