Commit e6034456 authored by Alexander O. Anisimov's avatar Alexander O. Anisimov

Fixed overrun panRange while zooming

parent 1b6c4e93
......@@ -234,7 +234,8 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L
var opts = axis.options,
min = minmax[axis.direction].min,
max = minmax[axis.direction].max,
zr = opts.zoomRange;
zr = opts.zoomRange,
pr = opts.panRange;
if (zr === false) // no zooming on this axis
return;
......@@ -248,6 +249,16 @@ Licensed under the MIT License ~ http://threedubmedia.googlecode.com/files/MIT-L
max = tmp;
}
//Check that we are in panRange
if (pr) {
if (pr[0] != null && min < pr[0]) {
min = pr[0];
}
if (pr[1] != null && max > pr[1]) {
max = pr[1];
}
}
var range = max - min;
if (zr &&
((zr[0] != null && range < zr[0]) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment