I'm drawing a dashed line and a dashed rect in fabricjs, but there is an issue when setting the strokeWidth too high for the line/rect to draw the strokeDashArray properly.
strokeDashArray: [10,2] and the
strokeWidh: 1 everything's fine, but if I set
strokeWidh: 5 the line/rect isn't dashed anymore.
I found out, that setting strokeLineCap: 'square' messes it up, but i don't understand why
Fiddle - Example: jsfiddle
Would appreciate any kind of help :D
asturur (contributor fabric.js) wrote this explanation:
Is not messed up. is how square workds. you have to make strokeDash with more space between "black and white".