From d64f36c8058ad935937c63a88cc20717a8be1f7c Mon Sep 17 00:00:00 2001 From: Yotam Berkowitz Date: Sat, 18 Nov 2017 23:14:27 +0200 Subject: [PATCH] Fix initial load when options start and end are not defined (#3664) --- lib/timeline/Timeline.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index 184c4891..b4ac6773 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -184,7 +184,7 @@ function Timeline (container, items, groups, options) { //Single time autoscale/fit this.initialFitDone = false; this.on('changed', function (){ - if (this.itemsData == null || this.options.rollingMode) return; + if (me.itemsData == null || me.options.rollingMode) return; if (!me.initialFitDone) { me.initialFitDone = true; if (me.options.start != undefined || me.options.end != undefined) { @@ -200,7 +200,7 @@ function Timeline (container, items, groups, options) { } } - if (!me.initialDrawDone && me.initialRangeChangeDone) { + if (!me.initialDrawDone && (me.initialRangeChangeDone || (!me.options.start && !me.options.end))) { me.initialDrawDone = true; me.dom.root.style.visibility = 'visible'; me.dom.loadingScreen.parentNode.removeChild(me.dom.loadingScreen);