@@ -14,7 +14,7 @@ const version_id = 'dev',
1414
1515/** @summary version date
1616 * @desc Release date in format day/month/year like '14/04/2022' */
17- version_date = '23 /10/2025',
17+ version_date = '27 /10/2025',
1818
1919/** @summary version id and date
2020 * @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -8904,8 +8904,12 @@ function floatToString(value, fmt, ret_fmt) {
89048904class DrawOptions {
89058905
89068906 constructor(opt) {
8907- this.opt = isStr(opt) ? opt.toUpperCase().trim() : '';
8908- this.part = '';
8907+ if (isStr(opt)) {
8908+ this.origin = opt.trim();
8909+ this.opt = this.origin.toUpperCase();
8910+ } else
8911+ this.opt = this.origin = '';
8912+ this.part = this.partO = '';
89098913 }
89108914
89118915 /** @summary Returns true if remaining options are empty or contain only separators symbols. */
@@ -8914,12 +8918,18 @@ class DrawOptions {
89148918 /** @summary Returns remaining part of the draw options. */
89158919 remain() { return this.opt; }
89168920
8921+ /** @summary Remove [pos, pos2) part from the string */
8922+ #cut(pos, pos2) {
8923+ this.opt = this.opt.slice(0, pos) + this.opt.slice(pos2);
8924+ this.origin = this.origin.slice(0, pos) + this.origin.slice(pos2);
8925+ }
8926+
89178927 /** @summary Checks if given option exists */
89188928 check(name, postpart) {
89198929 const pos = this.opt.indexOf(name);
89208930 if (pos < 0)
89218931 return false;
8922- this.opt = this.opt.slice(0, pos) + this.opt.slice( pos + name.length);
8932+ this.#cut(pos, pos + name.length);
89238933 this.part = '';
89248934 if (!postpart)
89258935 return true;
@@ -8939,7 +8949,8 @@ class DrawOptions {
89398949 }
89408950 if (pos2 > pos) {
89418951 this.part = this.opt.slice(pos, pos2);
8942- this.opt = this.opt.slice(0, pos) + this.opt.slice(pos2);
8952+ this.partO = this.origin.slice(pos, pos2);
8953+ this.#cut(pos, pos2);
89438954 }
89448955
89458956 if (is_array) {
@@ -8971,6 +8982,9 @@ class DrawOptions {
89718982 return false;
89728983 }
89738984
8985+ /** @summary Returns (original) part after found options. */
8986+ getPart(origin) { return origin ? this.partO : this.part; }
8987+
89748988 /** @summary Returns remaining part of found option as integer. */
89758989 partAsInt(offset, dflt) {
89768990 let mult = 1;
@@ -93071,13 +93085,13 @@ class THistDrawOptions {
9307193085
9307293086 // let configure histogram titles - only for debug purposes
9307393087 if (d.check('HTITLE:', true))
93074- histo.fTitle = decodeURIComponent(d.part.toLowerCase( ));
93088+ histo.fTitle = decodeURIComponent(d.getPart(true ));
9307593089 if (d.check('XTITLE:', true))
93076- histo.fXaxis.fTitle = decodeURIComponent(d.part.toLowerCase( ));
93090+ histo.fXaxis.fTitle = decodeURIComponent(d.getPart(true ));
9307793091 if (d.check('YTITLE:', true))
93078- histo.fYaxis.fTitle = decodeURIComponent(d.part.toLowerCase( ));
93092+ histo.fYaxis.fTitle = decodeURIComponent(d.getPart(true ));
9307993093 if (d.check('ZTITLE:', true))
93080- histo.fZaxis.fTitle = decodeURIComponent(d.part.toLowerCase( ));
93094+ histo.fZaxis.fTitle = decodeURIComponent(d.getPart(true ));
9308193095 if (d.check('POISSON2'))
9308293096 this.Poisson = kPoisson2;
9308393097 if (d.check('POISSON'))
0 commit comments