From 19019b85f9bf024d751c1a19861e907ae51078ff Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Tue, 1 Oct 2024 18:00:47 +0200 Subject: [PATCH] Build after elsin fixes --- build/jsroot.js | 25 +++++++++++++++---------- modules/gui/utils.mjs | 3 ++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/build/jsroot.js b/build/jsroot.js index 67b6a57c2..dfadaeeb6 100644 --- a/build/jsroot.js +++ b/build/jsroot.js @@ -60435,9 +60435,10 @@ function addMoveHandler(painter, enabled = true, hover_handler = false) { .property('assigned_move', true) .call(drag_move); - if (hover_handler) + if (hover_handler) { painter.draw_g.on('mouseenter', () => painter.draw_g.style('text-decoration', 'underline')) .on('mouseleave', () => painter.draw_g.style('text-decoration', null)); + } } /** @summary Inject style @@ -62835,7 +62836,8 @@ class TAxisPainter extends ObjectPainter { this.nticks2 = 1; } this.noexp = axis?.TestBit(EAxisBits.kNoExponent); - if ((this.scale_max < 300) && (this.scale_min > 0.3) && !this.noexp_changed) this.noexp = true; + if ((this.scale_max < 300) && (this.scale_min > 0.3) && !this.noexp_changed && (this.log === 1)) + this.noexp = true; this.moreloglabels = axis?.TestBit(EAxisBits.kMoreLogLabels); this.format = this.formatLog; } else if (this.kind === kAxisLabels) { @@ -65324,6 +65326,7 @@ class TFramePainter extends ObjectPainter { this.ymin = this.ymax = 0; // no scale specified, wait for objects drawing this.ranges_set = false; this.axes_drawn = false; + this.axes2_drawn = false; this.keys_handler = null; this.projection = 0; // different projections } @@ -65861,7 +65864,7 @@ class TFramePainter extends ObjectPainter { /** @summary Identify if requested axes are drawn * @desc Checks if x/y axes are drawn. Also if second side is already there */ hasDrawnAxes(second_x, second_y) { - return !second_x && !second_y ? this.axes_drawn : false; + return !second_x && !second_y ? this.axes_drawn : this.axes2_drawn; } /** @summary draw axes, @@ -65982,7 +65985,10 @@ class TFramePainter extends ObjectPainter { draw_vertical.invert_side ? 0 : this._frame_x, false); } - return Promise.all([pr1, pr2]); + return Promise.all([pr1, pr2]).then(() => { + this.axes2_drawn = true; + return true; + }); } @@ -66077,7 +66083,7 @@ class TFramePainter extends ObjectPainter { this.y2_handle?.removeG(); this.draw_g?.selectChild('.axis_layer').selectAll('*').remove(); - this.axes_drawn = false; + this.axes_drawn = this.axes2_drawn = false; } /** @summary Returns frame rectangle plus extra info for hint display */ @@ -66204,7 +66210,7 @@ class TFramePainter extends ObjectPainter { main_svg = this.draw_g.selectChild('.main_layer'); } - this.axes_drawn = false; + this.axes_drawn = this.axes2_drawn = false; this.draw_g.attr('transform', trans); @@ -137332,9 +137338,8 @@ function getBoundingBoxByChildren(context, svgnode) { if ((nodeBox[0] === 0) && (nodeBox[1] === 0) && (nodeBox[2] === 0) && (nodeBox[3] === 0)) return; var transform = child.computeNodeTransform(context); - // TODO: check and apply rotation matrix if any - nodeBox[0] += transform.tx; - nodeBox[1] += transform.ty; + nodeBox[0] = nodeBox[0] * transform.sx + transform.tx; + nodeBox[1] = nodeBox[1] * transform.sy + transform.ty; if (boundingBox.length === 0) boundingBox = nodeBox; else @@ -141364,7 +141369,7 @@ var GroupA = /** @class */ (function (_super) { box = this.getBoundingBox(context); scale = context.pdf.internal.scaleFactor; ph = context.pdf.internal.pageSize.getHeight(); - context.pdf.link(scale * (box[0] + context.transform.tx), ph - scale * (box[1] + context.transform.ty), scale * box[2], scale * box[3], { url: href }); + context.pdf.link(scale * (box[0] * context.transform.sx + context.transform.tx), ph - scale * (box[1] * context.transform.sy + context.transform.ty), scale * box[2], scale * box[3], { url: href }); } return [2 /*return*/]; } diff --git a/modules/gui/utils.mjs b/modules/gui/utils.mjs index 2997bce82..acfbf5570 100644 --- a/modules/gui/utils.mjs +++ b/modules/gui/utils.mjs @@ -378,9 +378,10 @@ function addMoveHandler(painter, enabled = true, hover_handler = false) { .property('assigned_move', true) .call(drag_move); - if (hover_handler) + if (hover_handler) { painter.draw_g.on('mouseenter', () => painter.draw_g.style('text-decoration', 'underline')) .on('mouseleave', () => painter.draw_g.style('text-decoration', null)); + } } /** @summary Inject style