Skip to content

Commit 7fb23c2

Browse files
committed
Fix - typo in assigning axis range from pad
Appeared only when pad.fLogy was set
1 parent 049b181 commit 7fb23c2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/JSRootPainter.hist.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,7 +3009,7 @@
30093009

30103010
this.scale_xmin = this.xmin;
30113011
this.scale_xmax = this.xmax;
3012-
if (use_pad_range) {
3012+
if (use_pad_range && pad) {
30133013
var dx = pad.fX2 - pad.fX1;
30143014
this.scale_xmin = pad.fX1 + dx*pad.fLeftMargin;
30153015
this.scale_xmax = pad.fX2 - dx*pad.fRightMargin;
@@ -3062,13 +3062,13 @@
30623062
this.scale_ymin = use_pad_range ? pad.fUymin : this.ymin;
30633063
this.scale_ymax = use_pad_range ? pad.fUymax : this.ymax;
30643064

3065-
if (use_pad_range) {
3065+
if (use_pad_range && pad) {
30663066
var dy = pad.fY2 - pad.fY1;
30673067
this.scale_ymin = pad.fY1 + dy*pad.fBottomMargin;
30683068
this.scale_ymax = pad.fY2 - dy*pad.fTopMargin;
3069-
if (pad.fLogx) {
3070-
this.scale_xmin = Math.pow(10, this.scale_xmin);
3071-
this.scale_xmax = Math.pow(10, this.scale_xmax);
3069+
if (pad.fLogy) {
3070+
this.scale_ymin = Math.pow(10, this.scale_ymin);
3071+
this.scale_ymax = Math.pow(10, this.scale_ymax);
30723072
}
30733073
}
30743074
if (this.zoom_ymin != this.zoom_ymax) {

0 commit comments

Comments
 (0)