From b3128bd32b1df718edb950ee05a7c6bb3163a5cc Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 10 Aug 2023 10:51:51 +0200 Subject: [PATCH] :bug: Fix overlay manual positioning --- frontend/src/app/main/ui/viewer/shapes.cljs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/ui/viewer/shapes.cljs b/frontend/src/app/main/ui/viewer/shapes.cljs index 13f9c10481..5c41de9211 100644 --- a/frontend/src/app/main/ui/viewer/shapes.cljs +++ b/frontend/src/app/main/ui/viewer/shapes.cljs @@ -38,11 +38,10 @@ (defn- find-relative-to-base-frame [shape objects overlays-ids base-frame] - (if (or (empty? overlays-ids) (nil? shape) (cph/root? shape)) - base-frame - (if (contains? overlays-ids (:id shape)) - shape - (find-relative-to-base-frame (cph/get-parent objects (:id shape)) objects overlays-ids base-frame)))) + (cond + (cph/frame-shape? shape) shape + (or (empty? overlays-ids) (nil? shape) (cph/root? shape)) base-frame + :else (find-relative-to-base-frame (cph/get-parent objects (:id shape)) objects overlays-ids base-frame))) (defn- activate-interaction [interaction shape base-frame frame-offset objects overlays]