mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 18:48:37 -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
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(if-let [workspace (:workspace state)]
|
||||
(if (:workspace state)
|
||||
(update state :workspace merge
|
||||
{:project project
|
||||
:page page
|
||||
:selected #{}
|
||||
:drawing nil})
|
||||
(update state :workspace merge
|
||||
{:project project
|
||||
:page page
|
||||
:flags #{:layers :element-options}
|
||||
:selected #{}
|
||||
:drawing nil})))))
|
||||
(assoc state :workspace
|
||||
{:project project
|
||||
:zoom 1
|
||||
:page page
|
||||
:flags #{:layers :element-options}
|
||||
:selected #{}
|
||||
:drawing nil})))))
|
||||
|
||||
(defn toggle-flag
|
||||
"Toggle the enabled flag of the specified tool."
|
||||
|
|
Loading…
Add table
Reference in a new issue