Add the ability to edit page name from page element-options.

This commit is contained in:
Andrey Antukh 2017-01-06 16:25:21 +01:00
parent bfce5f8a00
commit d3e81dc810
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
5 changed files with 115 additions and 52 deletions

View file

@ -62,10 +62,12 @@
:name name)
state (if (nil? group)
(-> state
(update-in [:pages page :shapes] #(into [] (cons id %)))
(update-in [:pages page :shapes]
#(into [] (cons id %)))
(assoc-in [:shapes id] shape))
(-> state
(update-in [:shapes group :items] #(into [] (cons id %)))
(update-in [:shapes group :items]
#(into [] (cons id %)))
(assoc-in [:shapes id] shape)))]
(->> (map #(get-in state [:shapes %]) items)
(reverse)