Skip to content

Commit de8c0ae

Browse files
committed
Fix - improve TProfile tooltip
If profile errors are too small, interactive area also too narrow. Now at least 5 pixels
1 parent 5d39a02 commit de8c0ae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/hist2d/TH1Painter.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,10 @@ class TH1Painter extends THistPainter {
538538
path_err += `M${midx-dlw},${my-yerr1+dend}h${2*dlw}m${-dlw},0v${yerr1+yerr2-2*dend}m${-dlw},0h${2*dlw}`;
539539
else
540540
path_err += `M${midx},${my-yerr1+dend}v${yerr1+yerr2-2*dend}`;
541-
if (hints_err !== null)
542-
hints_err += `M${midx-edx},${my-yerr1}h${2*edx}v${yerr1+yerr2}h${-2*edx}z`;
541+
if (hints_err !== null) {
542+
const he1 = Math.max(yerr1, 5), he2 = Math.max(yerr2, 5);
543+
hints_err += `M${midx-edx},${my-he1}h${2*edx}v${he1+he2}h${-2*edx}z`;
544+
}
543545
}, draw_bin = bin => {
544546
if (extract_bin(bin)) {
545547
if (show_text) {

0 commit comments

Comments
 (0)