mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 08:09:14 -05:00
Log whole token
This commit is contained in:
parent
df48295903
commit
5813acea02
1 changed files with 3 additions and 3 deletions
|
@ -30,10 +30,10 @@
|
||||||
[token shapes token-attributes]
|
[token shapes token-attributes]
|
||||||
(some #(token-applied? token % token-attributes) shapes))
|
(some #(token-applied? token % token-attributes) shapes))
|
||||||
|
|
||||||
(defn resolve-token-value [value]
|
(defn resolve-token-value [{:keys [value] :as token}]
|
||||||
(if-let [int-or-double (d/parse-double value)]
|
(if-let [int-or-double (d/parse-double value)]
|
||||||
int-or-double
|
int-or-double
|
||||||
(throw (ex-info (str "Implement token value resolve for " value) value))))
|
(throw (ex-info (str "Implement token value resolve for " value) token))))
|
||||||
|
|
||||||
;; Update functions ------------------------------------------------------------
|
;; Update functions ------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
(eduction
|
(eduction
|
||||||
(remove #(tokens-applied? token % attributes))
|
(remove #(tokens-applied? token % attributes))
|
||||||
(map :id)))
|
(map :id)))
|
||||||
token-value (resolve-token-value (:value token))]
|
token-value (resolve-token-value token)]
|
||||||
(doseq [shape selected-shapes]
|
(doseq [shape selected-shapes]
|
||||||
(st/emit! (on-apply {:token-id (:id token)
|
(st/emit! (on-apply {:token-id (:id token)
|
||||||
:shape-id (:id shape)
|
:shape-id (:id shape)
|
||||||
|
|
Loading…
Add table
Reference in a new issue