From 8d89f2bdde6658a435c9daa03f392d892acf749f Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 15 Apr 2026 19:15:59 +0000 Subject: [PATCH] :recycle: Use d/xf:add-index in custom stroke shape component Signed-off-by: Andrey Antukh --- frontend/src/app/main/ui/shapes/custom_stroke.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/shapes/custom_stroke.cljs b/frontend/src/app/main/ui/shapes/custom_stroke.cljs index 02c3b5d07e..3c589f5250 100644 --- a/frontend/src/app/main/ui/shapes/custom_stroke.cljs +++ b/frontend/src/app/main/ui/shapes/custom_stroke.cljs @@ -485,6 +485,10 @@ shape-shadow (get shape :shadow) shape-strokes (not-empty strokes) + strokes + (mf/with-memo [strokes] + (rseq (into [] d/xf:add-index strokes))) + svg-attrs (attrs/get-svg-props shape render-id) style (-> (obj/get props "style") @@ -509,7 +513,7 @@ (when (some? shape-strokes) [:> :g props - (for [[index value] (reverse (d/enumerate shape-strokes))] + (for [{:keys [::d/index] :as value} strokes] [:& shape-custom-stroke {:shape shape :stroke value :index index