0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

🐛 Fix problem with inner stroke

This commit is contained in:
alonso.torres 2021-11-04 09:52:41 +01:00 committed by Andrés Moya
parent e26f9e4a71
commit 9a66f26bd9

View file

@ -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}])))