Skip to content

Commit 6ce3af4

Browse files
committed
Fix failing CI for text_on_shapes_basic pixel comparison
- Simplify the dash line styling implementation by replacing the single `.style()` call with an object parameter with chained `.style()` method calls - Set `stroke-dasharray` to `null` when dash is falsy to properly clear the style rather than setting it to an empty or undefined value - Improve code readability through method chaining pattern
1 parent 26eecd9 commit 6ce3af4

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/components/drawing/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,8 @@ drawing.dashLine = function (s, dash, lineWidth) {
193193

194194
dash = drawing.dashStyle(dash, lineWidth);
195195

196-
s.style({
197-
'stroke-dasharray': dash,
198-
'stroke-width': lineWidth + 'px'
199-
});
196+
s.style('stroke-width', lineWidth + 'px')
197+
.style('stroke-dasharray', dash || null);
200198
};
201199

202200
drawing.dashStyle = function (dash, lineWidth) {

0 commit comments

Comments
 (0)