mirror of
https://github.com/penpot/penpot.git
synced 2026-09-07 12:40:12 +00:00
🐛 Fixed problem with recursive color changes for frames
This commit is contained in:
parent
f8abcc1b9c
commit
f992c740d5
@ -111,7 +111,8 @@
|
|||||||
(watch [_ state s]
|
(watch [_ state s]
|
||||||
(let [pid (:current-page-id state)
|
(let [pid (:current-page-id state)
|
||||||
objects (get-in state [:workspace-data :pages-index pid :objects])
|
objects (get-in state [:workspace-data :pages-index pid :objects])
|
||||||
children (mapcat #(cph/get-children % objects) ids)
|
not-frame (fn [shape-id] (not= (get-in objects [shape-id :type]) :frame))
|
||||||
|
children (->> ids (filter not-frame) (mapcat #(cph/get-children % objects)))
|
||||||
ids (into ids children)
|
ids (into ids children)
|
||||||
|
|
||||||
is-text? #(= :text (:type (get objects %)))
|
is-text? #(= :text (:type (get objects %)))
|
||||||
@ -138,7 +139,8 @@
|
|||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state s]
|
(watch [_ state s]
|
||||||
(let [objects (get-in state [:workspace-data :pages-index (:current-page-id state) :objects])
|
(let [objects (get-in state [:workspace-data :pages-index (:current-page-id state) :objects])
|
||||||
children (mapcat #(cph/get-children % objects) ids)
|
not-frame (fn [shape-id] (not= (get-in objects [shape-id :type]) :frame))
|
||||||
|
children (->> ids (filter not-frame) (mapcat #(cph/get-children % objects)))
|
||||||
ids (into ids children)
|
ids (into ids children)
|
||||||
|
|
||||||
update-fn (fn [s]
|
update-fn (fn [s]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user