From b2f4e90a79350ec571d34b7db4af5ec7c18a5c0b Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 2 Apr 2026 16:04:17 +0000 Subject: [PATCH] :recycle: Convert shape-distance-segment to modern * component format Convert shape-distance-segment to shape-distance-segment* using {:keys [...]} destructuring and update its internal call site in shape-distance to use [:> ...]. --- .../src/app/main/ui/workspace/viewport/snap_distances.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/viewport/snap_distances.cljs b/frontend/src/app/main/ui/workspace/viewport/snap_distances.cljs index c903a19389..97b8c905f8 100644 --- a/frontend/src/app/main/ui/workspace/viewport/snap_distances.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/snap_distances.cljs @@ -50,7 +50,7 @@ (def pill-text-border-radius 4) (def pill-text-padding 4) -(mf/defc shape-distance-segment +(mf/defc shape-distance-segment* "Displays a segment between two selrects with the distance between them" [{:keys [sr1 sr2 coord zoom]}] (let [from-c (mth/min (get sr1 (if (= :x coord) :x2 :y2)) @@ -268,7 +268,7 @@ #(rx/push! subject [selrect selected frame])) (for [[sr1 sr2] segments-to-display] - [:& shape-distance-segment + [:> shape-distance-segment* {:key (str/ffmt "%-%-%-%" (dm/get-prop sr1 :x) (dm/get-prop sr1 :y)