From 9a66f26bd908d9b3eacb52fa4bb5ccec8b387116 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 4 Nov 2021 09:52:41 +0100 Subject: [PATCH] :bug: Fix problem with inner stroke --- .../src/app/main/ui/shapes/custom_stroke.cljs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/main/ui/shapes/custom_stroke.cljs b/frontend/src/app/main/ui/shapes/custom_stroke.cljs index a3197e0c9..bf627751b 100644 --- a/frontend/src/app/main/ui/shapes/custom_stroke.cljs +++ b/frontend/src/app/main/ui/shapes/custom_stroke.cljs @@ -161,22 +161,23 @@ (mf/defc stroke-defs [{:keys [shape render-id]}] - (when (and (= (:type shape) :path) - (gsh/open-path? shape)) + + (let [open-path? (and (= :path (:type shape)) (gsh/open-path? shape))] (cond - (and (= :inner (:stroke-alignment shape :center)) + (and (not open-path?) + (= :inner (:stroke-alignment shape :center)) (> (:stroke-width shape 0) 0)) [:& inner-stroke-clip-path {:shape shape :render-id render-id}] - (and (= :outer (:stroke-alignment shape :center)) + (and (not open-path?) + (= :outer (:stroke-alignment shape :center)) (> (:stroke-width shape 0) 0)) [:& outer-stroke-mask {:shape shape :render-id render-id}] - (and (or (some? (:stroke-cap-start shape)) - (some? (:stroke-cap-end shape))) - (= (:stroke-alignment shape) :center)) + (or (some? (:stroke-cap-start shape)) + (some? (:stroke-cap-end shape))) [:& cap-markers {:shape shape :render-id render-id}])))