mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 09:46:11 +02:00
🐛 Add fix files function to removed :shapes-group from :touched
This commit is contained in:
parent
e7e70b4edd
commit
5590210088
1 changed files with 17 additions and 0 deletions
|
@ -117,3 +117,20 @@
|
||||||
(l/trc :hint "file repaired" :file-id (str (:id file))))
|
(l/trc :hint "file repaired" :file-id (str (:id file))))
|
||||||
|
|
||||||
file'))
|
file'))
|
||||||
|
|
||||||
|
(defn fix-touched-shapes-group
|
||||||
|
[file _]
|
||||||
|
;; Remove :shapes-group from the touched elements
|
||||||
|
(letfn [(fix-fdata [data]
|
||||||
|
(-> data
|
||||||
|
(update :pages-index update-vals fix-container)))
|
||||||
|
|
||||||
|
(fix-container [container]
|
||||||
|
(d/update-when container :objects update-vals fix-shape))
|
||||||
|
|
||||||
|
(fix-shape [shape]
|
||||||
|
(d/update-when shape :touched
|
||||||
|
(fn [touched]
|
||||||
|
(disj touched :shapes-group))))]
|
||||||
|
file (-> file
|
||||||
|
(update :data fix-fdata))))
|
Loading…
Add table
Add a link
Reference in a new issue