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:
parent
46d7bd2f23
commit
9ce6cd0f92
1 changed files with 8 additions and 7 deletions
|
@ -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."
|
||||||
|
|
Loading…
Add table
Reference in a new issue