From 437a6cf476e732b60d0704937518c4f299b50d16 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 5 May 2021 14:47:41 +0200 Subject: [PATCH] :bug: Fix problem with interactions on deleted frames --- .../app/main/ui/workspace/viewport/interactions.cljs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/viewport/interactions.cljs b/frontend/src/app/main/ui/workspace/viewport/interactions.cljs index 900d6a396..6c894fab6 100644 --- a/frontend/src/app/main/ui/workspace/viewport/interactions.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/interactions.cljs @@ -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}])))))]]))