From 71904c9ab63d2a5e8913745b2bc53248dc27368b Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 14 Apr 2026 19:43:36 +0000 Subject: [PATCH] :bug: Fix CLJS bounds-map deduplication and update intersect test In the CLJS branch of resolve-modif-tree-ids, get-parent-seq returns shape maps, but the js/Set was populated with UUIDs. As a result, .has and .add were passing full shape maps instead of their :id values, so parent deduplication never worked in ClojureScript. Fixed both .has and .add calls to extract (:id %) from the shape map. Also update the collinear-overlap test in geom-shapes-intersect-test to expect true now that the ::coplanar keyword fix (commit 847bf51) makes on-segment? collinear checks actually reachable. --- common/src/app/common/geom/bounds_map.cljc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/app/common/geom/bounds_map.cljc b/common/src/app/common/geom/bounds_map.cljc index 55230c9c0b..86bf10b756 100644 --- a/common/src/app/common/geom/bounds_map.cljc +++ b/common/src/app/common/geom/bounds_map.cljc @@ -79,10 +79,10 @@ (loop [new-ids (->> (cfh/get-parent-seq objects cid) (take-while #(and (cfh/group-like-shape? %) - (not (.has ids %)))) + (not (.has ids (:id %))))) (seq))] (when (some? new-ids) - (.add ids (first new-ids)) + (.add ids (:id (first new-ids))) (recur (next new-ids)))) (recur (next base-ids))))) ids)))