Skip to content

Commit

Permalink
Build with TH1 y range selection
Browse files Browse the repository at this point in the history
  • Loading branch information
linev committed May 24, 2024
1 parent 3dd19f1 commit 74f57bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build/jsroot.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
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 dev
1. Fix - properly select TF1 range after zooming
2. Fix - TH1 y-range selection


## Changes in 7.7.0
Expand Down

0 comments on commit 74f57bf

Please sign in to comment.