diff --git a/CHANGES.md b/CHANGES.md index 571f08c556..dcba356abc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -34,6 +34,7 @@ - Fix lock/hide elements in context menu when multiples shapes selected [Taiga #2340](https://tree.taiga.io/project/penpot/issue/2340) - Fix problem with booleans [Taiga #2356](https://tree.taiga.io/project/penpot/issue/2356) - Fix line-height/letter-spacing inputs behaviour [Taiga #2331](https://tree.taiga.io/project/penpot/issue/2331) +- Fix dotted style in strokes [Taiga #2312](https://tree.taiga.io/project/penpot/issue/2312) ### :arrow_up: Deps updates ### :heart: Community contributions by (Thank you!) diff --git a/frontend/src/app/main/ui/shapes/attrs.cljs b/frontend/src/app/main/ui/shapes/attrs.cljs index 9cf576dede..8c72f72943 100644 --- a/frontend/src/app/main/ui/shapes/attrs.cljs +++ b/frontend/src/app/main/ui/shapes/attrs.cljs @@ -18,7 +18,8 @@ [width style] (let [values (case style :mixed [5 5 1 5] - :dotted [5 5] + ;; We want 0 so they are circles + :dotted [(- width) 5] :dashed [10 10] nil)] @@ -132,9 +133,13 @@ ;; for inner or outer strokes. (and (spec/stroke-caps-line (:stroke-cap-start shape)) (= (:stroke-cap-start shape) (:stroke-cap-end shape)) - (not (#{:inner :outer} (:stroke-alignment shape)))) + (not (#{:inner :outer} (:stroke-alignment shape))) + (not= :dotted stroke-style)) (assoc :strokeLinecap (:stroke-cap-start shape)) + (= :dotted stroke-style) + (assoc :strokeLinecap "round") + ;; For other cap types we use markers. (and (or (spec/stroke-caps-marker (:stroke-cap-start shape)) (and (spec/stroke-caps-line (:stroke-cap-start shape))