🐛 Add script for fix files with bad shape-ref

This commit is contained in:
Pablo Alba 2023-07-31 16:04:21 +02:00 committed by Andrés Moya
parent 228b09c340
commit 1bb3a3a084
5 changed files with 90 additions and 20 deletions

View file

@ -112,7 +112,7 @@
main-instance? (:main-instance root-inst)
libs (wsh/get-libraries state)
component (ctf/get-component libs (:component-id root-inst))
component (ctf/find-component libs (:component-id root-inst))
library (ctf/get-component-library libs root-inst)
shapes-inst (cph/get-children-with-self (:objects page) root-inst-id)
@ -152,7 +152,7 @@
root-inst (ctn/get-shape page root-inst-id)
libs (wsh/get-libraries state)
component (ctf/get-component libs (:component-id root-inst))
component (ctf/find-component libs (:component-id root-inst))
library (ctf/get-component-library libs root-inst)
shapes-inst (cph/get-children-with-self (:objects page) root-inst-id)
@ -167,7 +167,7 @@
"Get the component with the given id and all its shapes."
[state component-id]
(let [libs (wsh/get-libraries state)
component (ctf/get-component libs component-id)
component (ctf/find-component libs component-id)
library (ctf/get-component-library libs component)
shapes-main (ctf/get-component-shapes (:data library) component)]