mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 15:51:37 -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 (:draw-interaction-to local)
|
||||||
draw-interaction-to-frame (:draw-interaction-to-frame local)
|
draw-interaction-to-frame (:draw-interaction-to-frame local)
|
||||||
first-selected (first selected-shapes)]
|
first-selected (first selected-shapes)]
|
||||||
[:*
|
|
||||||
|
[:g.interactions
|
||||||
|
[:g.non-selected
|
||||||
(for [shape active-shapes]
|
(for [shape active-shapes]
|
||||||
(let [interaction (get-click-interaction shape)
|
(let [interaction (get-click-interaction shape)
|
||||||
dest-shape (get objects (:destination interaction))
|
dest-shape (get objects (:destination interaction))
|
||||||
selected? (contains? selected (:id shape))]
|
selected? (contains? selected (:id shape))]
|
||||||
(when-not selected?
|
(when-not (or selected? (not dest-shape))
|
||||||
[:& interaction-path {:key (:id shape)
|
[:& interaction-path {:key (:id shape)
|
||||||
:orig-shape shape
|
:orig-shape shape
|
||||||
:dest-shape dest-shape
|
:dest-shape dest-shape
|
||||||
:selected selected
|
:selected selected
|
||||||
:selected? false
|
:selected? false
|
||||||
:zoom zoom}])))
|
:zoom zoom}])))]
|
||||||
|
|
||||||
|
[:g.selected
|
||||||
(if (and draw-interaction-to first-selected)
|
(if (and draw-interaction-to first-selected)
|
||||||
[:& interaction-path {:key "interactive"
|
[:& interaction-path {:key "interactive"
|
||||||
:orig-shape first-selected
|
:orig-shape first-selected
|
||||||
|
@ -216,5 +219,5 @@
|
||||||
[:& interaction-handle {:key (:id shape)
|
[:& interaction-handle {:key (:id shape)
|
||||||
:shape shape
|
:shape shape
|
||||||
:selected selected
|
:selected selected
|
||||||
:zoom zoom}])))))]))
|
:zoom zoom}])))))]]))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue