Browse Source

fix(timeline): Fix #2590 Min zoom bug (#2646)

* Fix redraw order
* Fix error when option is not defined
* Allow template labels
* Add .travis.yml file
* Add experiment travis code
* Fix react example
* Fix zoom below 1ms bug
runTests
yotamberk 8 years ago
committed by Alexander Wunschik
parent
commit
6ac924c4c3
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      lib/timeline/Range.js

+ 3
- 1
lib/timeline/Range.js View File

@ -342,7 +342,9 @@ Range.prototype._applyRange = function(start, end) {
zoomMin = 0;
}
if ((newEnd - newStart) < zoomMin) {
if ((this.end - this.start) === zoomMin && newStart > this.start && newEnd < this.end) {
// compensate for a scale of 0.5 ms
var compensation = 0.5;
if ((this.end - this.start) === zoomMin && newStart >= this.start - compensation && newEnd <= this.end) {
// ignore this action, we are already zoomed to the minimum
newStart = this.start;
newEnd = this.end;

Loading…
Cancel
Save