mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
🐛 Fix problem with interactions on deleted frames
This commit is contained in:
parent
a91a57581f
commit
437a6cf476
1 changed files with 7 additions and 4 deletions
|
@ -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}])))))]]))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue