♻️ 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 [:> ...].
This commit is contained in:
Andrey Antukh 2026-04-02 16:04:17 +00:00 committed by Belén Albeza
parent b4ec0a6d55
commit b2f4e90a79

View File

@ -50,7 +50,7 @@
(def pill-text-border-radius 4) (def pill-text-border-radius 4)
(def pill-text-padding 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" "Displays a segment between two selrects with the distance between them"
[{:keys [sr1 sr2 coord zoom]}] [{:keys [sr1 sr2 coord zoom]}]
(let [from-c (mth/min (get sr1 (if (= :x coord) :x2 :y2)) (let [from-c (mth/min (get sr1 (if (= :x coord) :x2 :y2))
@ -268,7 +268,7 @@
#(rx/push! subject [selrect selected frame])) #(rx/push! subject [selrect selected frame]))
(for [[sr1 sr2] segments-to-display] (for [[sr1 sr2] segments-to-display]
[:& shape-distance-segment [:> shape-distance-segment*
{:key (str/ffmt "%-%-%-%" {:key (str/ffmt "%-%-%-%"
(dm/get-prop sr1 :x) (dm/get-prop sr1 :x)
(dm/get-prop sr1 :y) (dm/get-prop sr1 :y)