mirror of
https://github.com/penpot/penpot.git
synced 2025-05-17 12:36:11 +02:00
🎉 Avoid setting token to group shapes (#6055)
* 🎉 Avoid setting token to group shapes * 📎 Fix on update shape when double click
This commit is contained in:
parent
2aee2ea79e
commit
0efbebd94f
3 changed files with 28 additions and 3 deletions
|
@ -49,6 +49,13 @@
|
|||
(rx/mapcat
|
||||
(fn [resolved-tokens]
|
||||
(let [undo-id (js/Symbol)
|
||||
objects (dsh/lookup-page-objects state)
|
||||
|
||||
shape-ids (or (->> (select-keys objects shape-ids)
|
||||
(filter (fn [[_ shape]] (not= (:type shape) :group)))
|
||||
(keys))
|
||||
[])
|
||||
|
||||
resolved-value (get-in resolved-tokens [(wtt/token-identifier token) :resolved-value])
|
||||
tokenized-attributes (wtt/attributes-map attributes token)]
|
||||
(rx/of
|
||||
|
|
|
@ -371,8 +371,10 @@
|
|||
|
||||
(mf/defc menu-tree
|
||||
[{:keys [selected-shapes submenu-offset type errors] :as context-data}]
|
||||
(let [entries (if (and (not (some? errors))
|
||||
(seq selected-shapes))
|
||||
(let [shape-types (into #{} (map :type selected-shapes))
|
||||
entries (if (and (not (some? errors))
|
||||
(seq selected-shapes)
|
||||
(not= shape-types #{:group}))
|
||||
(if (some? type)
|
||||
(submenu-actions-selection-actions context-data)
|
||||
(selection-actions context-data))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue