0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-18 21:06:11 -05:00

Improve workspace initialization.

This commit is contained in:
Andrey Antukh 2016-04-05 22:27:27 +03:00
parent 46d7bd2f23
commit 9ce6cd0f92

View file

@ -30,18 +30,19 @@
(reify (reify
rs/UpdateEvent rs/UpdateEvent
(-apply-update [_ state] (-apply-update [_ state]
(if-let [workspace (:workspace state)] (if (:workspace state)
(update state :workspace merge (update state :workspace merge
{:project project {:project project
:page page :page page
:selected #{} :selected #{}
:drawing nil}) :drawing nil})
(update state :workspace merge (assoc state :workspace
{:project project {:project project
:page page :zoom 1
:flags #{:layers :element-options} :page page
:selected #{} :flags #{:layers :element-options}
:drawing nil}))))) :selected #{}
:drawing nil})))))
(defn toggle-flag (defn toggle-flag
"Toggle the enabled flag of the specified tool." "Toggle the enabled flag of the specified tool."