@@ -11,7 +11,7 @@ let version_id = "dev";
1111
1212/** @summary version date
1313 * @desc Release date in format day/month/year like "19/11/2021" */
14- let version_date = "21/07 /2022";
14+ let version_date = "8/08 /2022";
1515
1616/** @summary version id and date
1717 * @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -11086,10 +11086,10 @@ class ObjectPainter extends BasePainter {
1108611086 * @param {boolean} [noround] - if set, return coordinates will not be rounded
1108711087 * @protected */
1108811088 getAxisToSvgFunc(isndc, nornd) {
11089- let func = { isndc: isndc, nornd: nornd },
11089+ let func = { isndc, nornd },
1109011090 use_frame = this.draw_g && this.draw_g.property('in_frame');
1109111091 if (use_frame) func.main = this.getFramePainter();
11092- if (func.main && func.main. grx && func.main.gry) {
11092+ if (func.main?. grx && func.main? .gry) {
1109311093 if (nornd) {
1109411094 func.x = function(x) { return this.main.grx(x); };
1109511095 func.y = function(y) { return this.main.gry(y); };
@@ -11099,7 +11099,7 @@ class ObjectPainter extends BasePainter {
1109911099 }
1110011100 } else if (!use_frame) {
1110111101 let pp = this.getPadPainter();
11102- if (!isndc && pp ) func.pad = pp.getRootPad(true); // need for NDC conversion
11102+ if (!isndc) func.pad = pp? .getRootPad(true); // need for NDC conversion
1110311103 func.padw = pp?.getPadWidth() ?? 10;
1110411104 func.x = function(value) {
1110511105 if (this.pad) {
@@ -64393,35 +64393,48 @@ class THistPainter extends ObjectPainter {
6439364393 // special code to adjust frame position to actual position of palette
6439464394 if (can_move && fp && !this.do_redraw_palette) {
6439564395
64396+ let pad = pp?.getRootPad(true);
64397+
6439664398 if (this.options.Zvert) {
6439764399 if ((pal.fX1NDC > 0.5) && (fp.fX2NDC > pal.fX1NDC)) {
6439864400 need_redraw = true;
6439964401 fp.fX2NDC = pal.fX1NDC - 0.01;
64400- if (fp.fX1NDC > fp.fX2NDC-0.1) fp.fX1NDC = Math.max(0, fp.fX2NDC-0.1);
64402+
64403+ if (fp.fX1NDC > fp.fX2NDC - 0.1) fp.fX1NDC = Math.max(0, fp.fX2NDC - 0.1);
6440164404 } else if ((pal.fX2NDC < 0.5) && (fp.fX1NDC < pal.fX2NDC)) {
6440264405 need_redraw = true;
6440364406 fp.fX1NDC = pal.fX2NDC + 0.05;
6440464407 if (fp.fX2NDC < fp.fX1NDC + 0.1) fp.fX2NDC = Math.min(1., fp.fX1NDC + 0.1);
6440564408 }
64409+ if (need_redraw && pad) {
64410+ pad.fLeftMargin = fp.fX1NDC;
64411+ pad.fRightMargin = 1 - fp.fX2NDC;
64412+ }
6440664413 } else {
6440764414 if ((pal.fY1NDC > 0.5) && (fp.fY2NDC > pal.fY1NDC)) {
6440864415 need_redraw = true;
6440964416 fp.fY2NDC = pal.fY1NDC - 0.01;
64410- if (fp.fY1NDC > fp.fY2NDC- 0.1) fp.fY1NDC = Math.max(0, fp.fXYNDC- 0.1);
64417+ if (fp.fY1NDC > fp.fY2NDC - 0.1) fp.fY1NDC = Math.max(0, fp.fXYNDC - 0.1);
6441164418 } else if ((pal.fY2NDC < 0.5) && (fp.fY1NDC < pal.fY2NDC)) {
6441264419 need_redraw = true;
6441364420 fp.fY1NDC = pal.fY2NDC + 0.05;
6441464421 if (fp.fXYNDC < fp.fY1NDC + 0.1) fp.fY2NDC = Math.min(1., fp.fY1NDC + 0.1);
6441564422
6441664423 }
64424+ if (need_redraw && pad) {
64425+ pad.fTopMargin = fp.fY1NDC;
64426+ pad.fBottomMargin = 1 - fp.fY2NDC;
64427+ }
6441764428 }
6441864429 }
6441964430
6442064431 if (!need_redraw)
6442164432 return pal_painter;
6442264433
6442364434 this.do_redraw_palette = true;
64435+
6442464436 fp.redraw();
64437+
6442564438 let pr = !postpone_draw ? this.redraw() : Promise.resolve(true);
6442664439 return pr.then(() => {
6442764440 delete this.do_redraw_palette;
@@ -91063,7 +91076,7 @@ class TGraphTimePainter extends ObjectPainter {
9106391076 this._doing_primitives = true;
9106491077 }
9106591078
91066- let lst = this.getObject().fSteps.arr[this.step];
91079+ let lst = this.getObject()? .fSteps.arr[this.step];
9106791080
9106891081 if (!lst || (indx >= lst.arr.length)) {
9106991082 delete this._doing_primitives;
0 commit comments