0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

Set proper default flags on workspace.

And don't reset them on page change.
This commit is contained in:
Andrey Antukh 2017-03-25 19:48:18 +01:00
parent 16d2cbd381
commit a7236c17f2
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -49,14 +49,12 @@
(defrecord Initialize [project-id page-id] (defrecord Initialize [project-id page-id]
ptk/UpdateEvent ptk/UpdateEvent
(update [_ state] (update [_ state]
(let [default-flags #{:sitemap :drawtools :layers :element-options :rules} (let [default-flags #{:sitemap :drawtools :layers :element-options :rules}]
default-flags #{:document-history}]
(if (:workspace state) (if (:workspace state)
(update state :workspace merge (update state :workspace merge
{:project project-id {:project project-id
:page page-id :page page-id
:selected #{} :selected #{}
;; :flags default-flags
:drawing nil :drawing nil
:drawing-tool nil :drawing-tool nil
:tooltip nil}) :tooltip nil})