0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 23:31:21 -05:00

🐛 Fix problem with interactions on deleted frames

This commit is contained in:
alonso.torres 2021-05-05 14:47:41 +02:00
parent a91a57581f
commit 437a6cf476

View file

@ -181,19 +181,22 @@
draw-interaction-to (:draw-interaction-to local)
draw-interaction-to-frame (:draw-interaction-to-frame local)
first-selected (first selected-shapes)]
[:*
[:g.interactions
[:g.non-selected
(for [shape active-shapes]
(let [interaction (get-click-interaction shape)
dest-shape (get objects (:destination interaction))
selected? (contains? selected (:id shape))]
(when-not selected?
(when-not (or selected? (not dest-shape))
[:& interaction-path {:key (:id shape)
:orig-shape shape
:dest-shape dest-shape
:selected selected
:selected? false
:zoom zoom}])))
:zoom zoom}])))]
[:g.selected
(if (and draw-interaction-to first-selected)
[:& interaction-path {:key "interactive"
:orig-shape first-selected
@ -216,5 +219,5 @@
[:& interaction-handle {:key (:id shape)
:shape shape
:selected selected
:zoom zoom}])))))]))
:zoom zoom}])))))]]))