From 74f57bfa1959686143a3851069bbee6588b2ea35 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Fri, 24 May 2024 12:23:45 +0200 Subject: [PATCH] Build with TH1 y range selection --- build/jsroot.js | 7 ++++++- changes.md | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/jsroot.js b/build/jsroot.js index 73f2b5ac2..ab56c11f3 100644 --- a/build/jsroot.js +++ b/build/jsroot.js @@ -80782,7 +80782,7 @@ let TH1Painter$2 = class TH1Painter extends THistPainter { } // final adjustment like in THistPainter.cxx line 7309 - if (!this._exact_y_range && !pad_logy) { + if (!this._exact_y_range && !this._set_y_range && !pad_logy) { if ((this.options.BaseLine !== false) && (this.ymin >= 0)) this.ymin = 0; else { @@ -80806,17 +80806,22 @@ let TH1Painter$2 = class TH1Painter extends THistPainter { } } + this._set_y_range = false; + if ((hmin !== kNoZoom) && (hmax !== kNoZoom) && !this.draw_content && ((this.ymin === this.ymax) || (this.ymin > hmin) || (this.ymax < hmax))) { this.ymin = hmin; this.ymax = hmax; + this._set_y_range = true; } else { if (hmin !== kNoZoom) { + this._set_y_range = true; if (hmin < this.ymin) this.ymin = hmin; set_zoom = true; } if (hmax !== kNoZoom) { + this._set_y_range = true; if (hmax > this.ymax) this.ymax = hmax; set_zoom = true; diff --git a/changes.md b/changes.md index 83afbd490..391c00ebe 100644 --- a/changes.md +++ b/changes.md @@ -2,6 +2,7 @@ ## Changes in dev 1. Fix - properly select TF1 range after zooming +2. Fix - TH1 y-range selection ## Changes in 7.7.0