mirror of
https://github.com/penpot/penpot.git
synced 2025-06-01 03:11:38 +02:00
🐛 Fix dotted style in strokes
This commit is contained in:
parent
6354883a6f
commit
6334520c66
2 changed files with 8 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue