mirror of
https://github.com/penpot/penpot.git
synced 2025-08-01 16:01:49 +02:00
Fix edit modal not opening
This commit is contained in:
parent
cb942996a9
commit
b9b4abf1e0
2 changed files with 5 additions and 2 deletions
|
@ -33,7 +33,7 @@
|
||||||
:selected-pred #(seq (% ids-by-attributes))}))
|
:selected-pred #(seq (% ids-by-attributes))}))
|
||||||
|
|
||||||
(defn generic-attribute-actions [attributes title {:keys [token selected-shapes]}]
|
(defn generic-attribute-actions [attributes title {:keys [token selected-shapes]}]
|
||||||
(let [{:keys [on-update-shape]} (get wtty/token-types (:type token))
|
(let [{:keys [on-update-shape]} (wtty/get-token-properties token)
|
||||||
{:keys [selected-pred shape-ids]} (attribute-actions token selected-shapes attributes)]
|
{:keys [selected-pred shape-ids]} (attribute-actions token selected-shapes attributes)]
|
||||||
(map (fn [attribute]
|
(map (fn [attribute]
|
||||||
(let [selected? (selected-pred attribute)
|
(let [selected? (selected-pred attribute)
|
||||||
|
@ -200,7 +200,7 @@
|
||||||
(generic-attribute-actions #{:y} "Y" context-data)))}))
|
(generic-attribute-actions #{:y} "Y" context-data)))}))
|
||||||
|
|
||||||
(defn default-actions [{:keys [token]}]
|
(defn default-actions [{:keys [token]}]
|
||||||
(let [{:keys [modal]} (get wtty/token-types token)]
|
(let [{:keys [modal]} (wtty/get-token-properties token)]
|
||||||
[{:title "Delete Token"
|
[{:title "Delete Token"
|
||||||
:action #(st/emit! (dt/delete-token (:id token)))}
|
:action #(st/emit! (dt/delete-token (:id token)))}
|
||||||
{:title "Duplicate Token"
|
{:title "Duplicate Token"
|
||||||
|
|
|
@ -100,5 +100,8 @@
|
||||||
{:label "Text Decoration" :key :text-decoration}
|
{:label "Text Decoration" :key :text-decoration}
|
||||||
{:label "Text Case" :key :text-case}]}}])))
|
{:label "Text Case" :key :text-case}]}}])))
|
||||||
|
|
||||||
|
(defn get-token-properties [token]
|
||||||
|
(get token-types (:type token)))
|
||||||
|
|
||||||
(defn token-attributes [token-type]
|
(defn token-attributes [token-type]
|
||||||
(get-in token-types [token-type :attributes]))
|
(get-in token-types [token-type :attributes]))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue