mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 18:36:37 +02:00
✨ Add protection to fix script
This commit is contained in:
parent
cc07c7a580
commit
1f04304210
1 changed files with 4 additions and 2 deletions
|
@ -364,8 +364,10 @@
|
||||||
fix-touched-children
|
fix-touched-children
|
||||||
(fn [shape]
|
(fn [shape]
|
||||||
(let [matches? (fn [[child-id ref-child-id]]
|
(let [matches? (fn [[child-id ref-child-id]]
|
||||||
|
(if child-id
|
||||||
(let [child (ctn/get-shape page child-id)]
|
(let [child (ctn/get-shape page child-id)]
|
||||||
(= (:shape-ref child) ref-child-id)))
|
(= (:shape-ref child) ref-child-id))
|
||||||
|
false))
|
||||||
equal? (every? matches? (d/zip-all (:shapes shape) (:shapes ref-shape)))]
|
equal? (every? matches? (d/zip-all (:shapes shape) (:shapes ref-shape)))]
|
||||||
(when (and (not equal?) (not (cph/touched-group? shape :shapes-group)))
|
(when (and (not equal?) (not (cph/touched-group? shape :shapes-group)))
|
||||||
(println " -> set touched " (:name shape) (:id shape) :shapes :shapes-group))
|
(println " -> set touched " (:name shape) (:id shape) :shapes :shapes-group))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue