0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00
This commit is contained in:
Florian Schroedl 2024-07-24 13:36:38 +02:00
parent 113fc9891b
commit cbd5d42069

View file

@ -364,14 +364,11 @@
(generic-attribute-actions #{:x} "X" context-data)
(generic-attribute-actions #{:y} "Y" context-data)))}))
(defn shape-attribute-actions [{:keys [type token] :as context-data}]
(when-let [with-actions (get shape-attribute-actions-map (or type (:type token)))]
(with-actions context-data)))
(defn generate-menu-entries [{:keys [token selected-shapes] :as context-data}]
(defn generate-menu-entries [{:keys [type token] :as context-data}]
(let [{:keys [modal]} (get wtc/token-types (:type token))
attribute-actions (when (seq selected-shapes)
(shape-attribute-actions context-data))
with-actions (get shape-attribute-actions-map (or type (:type token)))
attribute-actions (when with-actions
(with-actions context-data))
default-actions [{:title "Delete Token"
:action #(st/emit! (dt/delete-token (:id token)))}
{:title "Duplicate Token"