mirror of
https://github.com/penpot/penpot.git
synced 2026-02-23 10:17:35 -05:00
Compare commits
1 Commits
develop
...
eva-add-no
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80920d320d |
@@ -620,7 +620,7 @@
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
;; We do not allow to apply tokens while text editor is open.
|
||||
(when (empty? (get state :workspace-editor-state))
|
||||
(if (empty? (get state :workspace-editor-state))
|
||||
(let [attributes-to-remove
|
||||
;; Remove atomic typography tokens when applying composite and vice-verca
|
||||
(cond
|
||||
@@ -674,7 +674,11 @@
|
||||
(if (rx/observable? res)
|
||||
res
|
||||
(rx/of res))))
|
||||
(rx/of (dwu/commit-undo-transaction undo-id)))))))))))))
|
||||
(rx/of (dwu/commit-undo-transaction undo-id)))))))))
|
||||
(rx/of (ntf/show {:content "patata"
|
||||
:type :toast
|
||||
:level :warning
|
||||
:timeout 3000}))))))
|
||||
|
||||
(defn apply-spacing-token-separated
|
||||
"Handles edge-case for spacing token when applying token via toggle button.
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.notifications :as ntf]
|
||||
[app.main.data.workspace.tokens.application :as dwta]
|
||||
[app.main.data.workspace.tokens.library-edit :as dwtl]
|
||||
[app.main.refs :as refs]
|
||||
@@ -136,9 +137,13 @@
|
||||
(fn [event token]
|
||||
(let [token (ctob/get-token tokens-lib selected-token-set-id (:id token))]
|
||||
(dom/stop-propagation event)
|
||||
(when (and not-editing? (seq selected-shapes) (not= (:type token) :number))
|
||||
(if (and not-editing? (seq selected-shapes) (not= (:type token) :number))
|
||||
(st/emit! (dwta/toggle-token {:token token
|
||||
:shape-ids selected-ids}))))))]
|
||||
:shape-ids selected-ids}))
|
||||
(st/emit! (ntf/show {:content "patata"
|
||||
:type :toast
|
||||
:level :warning
|
||||
:timeout 3000}))))))]
|
||||
|
||||
[:div {:class (stl/css :token-section-wrapper)
|
||||
:data-testid (dm/str "section-" (name type))}
|
||||
|
||||
Reference in New Issue
Block a user