Skip to content

Commit 3510769

Browse files
bellenotlinev
authored andcommitted
Extend 3D highlight dimension to avoid overlap with origin bin
1 parent 6277ba3 commit 3510769

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/JSRoot3DPainter.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,14 @@
415415
}
416416
}
417417

418+
if (tip !== null) {
419+
var delta = 1e-8*painter.size3d;
420+
if ((tip.x1 > tip.x2) || (tip.y1 > tip.y2) || (tip.z1 > tip.z2)) console.warn('check 3D hints coordinates');
421+
tip.x1 -= delta; tip.x2 += delta;
422+
tip.y1 -= delta; tip.y2 += delta;
423+
tip.z1 -= delta; tip.z2 += delta;
424+
}
425+
418426
painter.BinHighlight3D(tip);
419427

420428
return (painter.enable_tooltip && tip && tip.info) ? tip.info : "";

0 commit comments

Comments
 (0)