closes #12 (pan/zoom) into future
This commit is contained in:
parent
ee2df3ec8a
commit
aff0435fff
1 changed files with 9 additions and 0 deletions
|
@ -191,6 +191,15 @@ vz.handleControls = function () {
|
|||
break;
|
||||
}
|
||||
|
||||
// update delta after zoom
|
||||
delta = vz.options.plot.xaxis.max - vz.options.plot.xaxis.min;
|
||||
|
||||
// we dont want to zoom/pan into the future
|
||||
if (vz.options.plot.xaxis.max + delta > new Date().getTime()) {
|
||||
vz.options.plot.xaxis.max = new Date().getTime();
|
||||
vz.options.plot.xaxis.min = new Date().getTime() - delta;
|
||||
}
|
||||
|
||||
vz.entities.loadData();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue