We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3af87bd commit 263bfa4Copy full SHA for 263bfa4
scripts/JSRootPainter.js
@@ -4376,8 +4376,11 @@
4376
this.pad = pad;
4377
this.iscan = iscan; // indicate if working with canvas
4378
this.this_pad_name = "";
4379
- if (!this.iscan && (pad !== null) && ('fName' in pad))
+ if (!this.iscan && (pad !== null) && ('fName' in pad)) {
4380
this.this_pad_name = pad.fName.replace(" ", "_"); // avoid empty symbol in pad name
4381
+ var regexp = new RegExp("^[A-Za-z][A-Za-z0-9_]*$");
4382
+ if (!regexp.test(this.this_pad_name)) this.this_pad_name = 'jsroot_pad_' + JSROOT.id_counter++;
4383
+ }
4384
this.painters = []; // complete list of all painters in the pad
4385
this.has_canvas = true;
4386
}
0 commit comments