Skip to content

Commit 948fd02

Browse files
committed
add name to newshapes when creating a new one
1 parent 7bf5029 commit 948fd02

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/shapes/draw_newshape/newshapes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function createShapeObj(outlines, dragOptions, dragmode) {
126126
editable: true,
127127

128128
visible: newStyle.visible,
129-
129+
name: newStyle.name,
130130
showlegend: newStyle.showlegend,
131131
legend: newStyle.legend,
132132
legendwidth: newStyle.legendwidth,

test/image/mocks/text_on_shapes_basic.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
"line": {
5050
"color": "pink"
5151
},
52+
"name": "A New Shape",
5253
"label": {
53-
"text": "new shape"
54+
"text": "new shape label"
5455
},
5556
"showlegend": true
5657
},

0 commit comments

Comments
 (0)