Skip to content

Commit 936182e

Browse files
committed
Fix - correct tooltips for graph with marker drawing
1 parent f956dd2 commit 936182e

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

scripts/JSRootPainter.more.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,21 +1298,16 @@
12981298

12991299
if (this.marker_size > 0) radius = Math.max(this.marker_size, radius);
13001300

1301-
if (bestbin !== null)
1301+
if (bestbin)
13021302
bestdist = Math.sqrt(Math.pow(pnt.x-pmain.grx(bestbin.x),2) + Math.pow(pnt.y-pmain.gry(bestbin.y),2));
13031303

1304-
if (!islines && !ismark && (bestdist > radius)) bestbin = null;
1304+
if (!islines && (bestdist > radius)) bestbin = null;
13051305

1306-
if (ismark && (bestbin!==null)) {
1307-
if ((pnt.nproc == 1) && (bestdist > radius)) bestbin = null; else
1308-
if ((this.bins.length==1) && (bestdist > 3*radius)) bestbin = null;
1309-
}
1310-
1311-
if (bestbin === null) bestindx = -1;
1306+
if (!bestbin) bestindx = -1;
13121307

13131308
var res = { bin: bestbin, indx: bestindx, dist: bestdist, radius: Math.round(radius) };
13141309

1315-
if ((bestbin===null) && islines) {
1310+
if (!bestbin && islines) {
13161311

13171312
bestdist = 10000;
13181313

0 commit comments

Comments
 (0)