Skip to content

Commit

Permalink
Build with TGraphPolar tooltip fix
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed Nov 20, 2024
1 parent b1eb690 commit 2db5654
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
16 changes: 6 additions & 10 deletions build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const version_id = '7.8.x',

/** @summary version date
* @desc Release date in format day/month/year like '14/04/2022' */
version_date = '15/11/2024',
version_date = '20/11/2024',

/** @summary version id and date
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
Expand Down Expand Up @@ -10102,7 +10102,7 @@ function parseLatex(node, arg, label, curr) {
},

createSubPos = fscale => {
return { lvl: curr.lvl + 1, x: 0, y: 0, fsize: curr.fsize*(fscale || 1), color: curr.color, font: curr.font, parent: curr, painter: curr.painter };
return { lvl: curr.lvl + 1, x: 0, y: 0, fsize: curr.fsize*(fscale || 1), color: curr.color, font: curr.font, parent: curr, painter: curr.painter, italic: curr.italic, bold: curr.bold };
};

while (label) {
Expand Down Expand Up @@ -10449,11 +10449,7 @@ function parseLatex(node, arg, label, curr) {

const subpos = createSubPos();

let value;
for (let c = curr; c && (value === undefined && c); c = c.parent)
value = c[found.bi];

subpos[found.bi] = !value;
subpos[found.bi] = !subpos[found.bi];

parseLatex(currG(), arg, sublabel, subpos);

Expand Down Expand Up @@ -152423,7 +152419,7 @@ class TGraphPolarPainter extends ObjectPainter {

for (let n = 0; n < graph.fNpoints; ++n) {
const pos = main.translate(graph.fX[n], graph.fY[n]),
dist2 = (pos.x-pnt.x)**2 + (pos.y-pnt.y)**2;
dist2 = (pos.grx-pnt.x)**2 + (pos.gry-pnt.y)**2;
if (dist2 < best_dist2) { best_dist2 = dist2; bestindx = n; bestpos = pos; }
}

Expand All @@ -152434,8 +152430,8 @@ class TGraphPolarPainter extends ObjectPainter {

const res = {
name: this.getObject().fName, title: this.getObject().fTitle,
x: bestpos.x, y: bestpos.y,
color1: this.markeratt?.used ? this.markeratt.color : this.lineatt.color,
x: bestpos.grx, y: bestpos.gry,
color1: (this.markeratt?.used ? this.markeratt.color : undefined) ?? (this.fillatt?.used ? this.fillatt.color : undefined) ?? this.lineatt?.color,
exact: Math.sqrt(best_dist2) < 4,
lines: [this.getObjectHint()],
binindx: bestindx,
Expand Down
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Changes in 7.8.x
1. Fix - correctly position title according to gStyle->GetTitleAlign()
2. Fix - tooltips on TGraphPolar


## Changes in 7.8.0
Expand Down
2 changes: 1 addition & 1 deletion modules/core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const version_id = '7.8.x',

/** @summary version date
* @desc Release date in format day/month/year like '14/04/2022' */
version_date = '15/11/2024',
version_date = '20/11/2024',

/** @summary version id and date
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
Expand Down

0 comments on commit 2db5654

Please sign in to comment.