From f41eca12f4e5db11b1be1d58c84de4af16d7f280 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 25 Feb 2026 13:47:40 +0100 Subject: [PATCH] :bug: Fix problem with frame title movement --- common/src/app/common/types/shape_tree.cljc | 32 +++++++++++-------- .../main/ui/workspace/viewport/widgets.cljs | 2 +- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/common/src/app/common/types/shape_tree.cljc b/common/src/app/common/types/shape_tree.cljc index 20f542fbbe..92732e18a1 100644 --- a/common/src/app/common/types/shape_tree.cljc +++ b/common/src/app/common/types/shape_tree.cljc @@ -115,21 +115,25 @@ (defn get-frames "Retrieves all frame objects as vector" ([objects] (get-frames objects nil)) - ([objects {:keys [skip-components? skip-copies?] + ([objects {:keys [skip-components? skip-copies? ignore-index?] :or {skip-components? false - skip-copies? false}}] - (->> (or (-> objects meta ::index-frames) - (let [lookup (d/getf objects) - xform (comp (remove #(= uuid/zero %)) - (keep lookup) - (filter cfh/frame-shape?))] - (->> (keys objects) - (sequence xform)))) - (remove #(or (and ^boolean skip-components? - ^boolean (ctk/instance-head? %)) - (and ^boolean skip-copies? - (and ^boolean (ctk/instance-head? %) - (not ^boolean (ctk/main-instance? %))))))))) + skip-copies? false + ignore-index? false}}] + (let [frame-index + (if (and (not ignore-index?) (-> objects meta ::index-frames)) + (-> objects meta ::index-frames) + (let [lookup (d/getf objects) + xform (comp (remove #(= uuid/zero %)) + (keep lookup) + (filter cfh/frame-shape?))] + (->> (keys objects) + (sequence xform))))] + (->> frame-index + (remove #(or (and ^boolean skip-components? + ^boolean (ctk/instance-head? %)) + (and ^boolean skip-copies? + (and ^boolean (ctk/instance-head? %) + (not ^boolean (ctk/main-instance? %)))))))))) (defn get-frames-ids "Retrieves all frame ids as vector" diff --git a/frontend/src/app/main/ui/workspace/viewport/widgets.cljs b/frontend/src/app/main/ui/workspace/viewport/widgets.cljs index 9d101982a7..f3dd84ca4e 100644 --- a/frontend/src/app/main/ui/workspace/viewport/widgets.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/widgets.cljs @@ -242,7 +242,7 @@ [{:keys [objects zoom selected focus is-show-artboard-names on-frame-enter on-frame-leave on-frame-select]}] (let [selected (or selected #{}) - shapes (ctt/get-frames objects {:skip-copies? true}) + shapes (ctt/get-frames objects {:skip-copies? true :ignore-index? true}) shapes (if (dbg/enabled? :shape-titles) (into (set shapes) (map (d/getf objects))