Skip to content

Commit 0d46512

Browse files
committed
Add line_dash_offset parameter
1 parent 7e95972 commit 0d46512

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ipycanvas/canvas.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ class Canvas(DOMWidget):
9191

9292
_line_dash = List()
9393

94+
#: (float) Specifies where to start a dash array on a line. Default is ``0.``.
95+
line_dash_offset = Float(0.)
96+
9497
def __init__(self, *args, **kwargs):
9598
"""Create a Canvas widget."""
9699
#: Whether commands should be cached or not
@@ -299,7 +302,7 @@ def flush(self):
299302

300303
@observe('fill_style', 'stroke_style', 'global_alpha', 'font', 'text_align',
301304
'text_baseline', 'direction', 'global_composite_operation',
302-
'line_width', 'line_cap', 'line_join', 'miter_limit')
305+
'line_width', 'line_cap', 'line_join', 'miter_limit', 'line_dash_offset')
303306
def _on_set_attr(self, change):
304307
command = {
305308
'name': 'set',

0 commit comments

Comments
 (0)