Browse Source

Fix zooming bug (#3715)

develop
Yotam Berkowitz 7 years ago
committed by GitHub
parent
commit
a1706d5b51
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      lib/timeline/Timeline.js

+ 3
- 2
lib/timeline/Timeline.js View File

@ -189,7 +189,7 @@ function Timeline (container, items, groups, options) {
this.initialFitDone = false; this.initialFitDone = false;
this.on('changed', function (){ this.on('changed', function (){
if (me.itemsData == null) return; if (me.itemsData == null) return;
if (!me.initialFitDone || !me.options.rollingMode) {
if (!me.initialFitDone && !me.options.rollingMode) {
me.initialFitDone = true; me.initialFitDone = true;
if (me.options.start != undefined || me.options.end != undefined) { if (me.options.start != undefined || me.options.end != undefined) {
if (me.options.start == undefined || me.options.end == undefined) { if (me.options.start == undefined || me.options.end == undefined) {
@ -204,7 +204,8 @@ function Timeline (container, items, groups, options) {
} }
} }
if (!me.initialDrawDone && (me.initialRangeChangeDone || (!me.options.start && !me.options.end) || me.options.rollingMode)) {
if (!me.initialDrawDone && (me.initialRangeChangeDone || (!me.options.start && !me.options.end)
|| me.options.rollingMode)) {
me.initialDrawDone = true; me.initialDrawDone = true;
me.itemSet.initialDrawDone = true; me.itemSet.initialDrawDone = true;
me.dom.root.style.visibility = 'visible'; me.dom.root.style.visibility = 'visible';

Loading…
Cancel
Save