Skip to content

Commit d3136aa

Browse files
committed
fix issue 4460 - accept symbol numbers in string format
1 parent 29b456e commit d3136aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/drawing/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,10 @@ Object.keys(SYMBOLDEFS).forEach(function(k) {
235235
} else {
236236
drawing.symbolList.push(
237237
n + 200,
238+
String(n + 200),
238239
k + '-dot',
239240
n + 300,
241+
String(n + 300),
240242
k + '-open-dot'
241243
);
242244
}
@@ -250,7 +252,9 @@ var MAXSYMBOL = drawing.symbolNames.length;
250252
var DOTPATH = 'M0,0.5L0.5,0L0,-0.5L-0.5,0Z';
251253

252254
drawing.symbolNumber = function(v) {
253-
if(typeof v === 'string') {
255+
if(isNumeric(v)) {
256+
v = +v;
257+
} else if(typeof v === 'string') {
254258
var vbase = 0;
255259
if(v.indexOf('-open') > 0) {
256260
vbase = 100;

0 commit comments

Comments
 (0)