From f171328c10dd56f281b8c7e699bc56b968da6c7e Mon Sep 17 00:00:00 2001 From: jos Date: Tue, 26 Jan 2016 09:33:08 +0100 Subject: [PATCH] Fixed #1541: Timeline and Graph2d did not load synchronously anymore --- HISTORY.md | 2 ++ lib/timeline/Graph2d.js | 2 ++ lib/timeline/Timeline.js | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 9a28ac26..11447f1c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -24,6 +24,7 @@ http://visjs.org - Fixed #1580: Invisible timeline/graph should not be drawn, as most inputs are invalid - Fixed #1521: Prevent items from staying stuck to the left side of the viewport. - Fixed #1592: Emit a "changed" event after each redraw. +- Fixed #1541: Timeline and Graph2d did not load synchronously anymore. ### Graph2d @@ -34,6 +35,7 @@ http://visjs.org - Cleanup of linegraph's event handling. - Fixed #1017: Fixed minWidth behavior for bars. - Fixes #1557: Fix default axis formatting function. +- Fixed #1541: Timeline and Graph2d did not load synchronously anymore. ## 2016-01-08, version 4.12.0 diff --git a/lib/timeline/Graph2d.js b/lib/timeline/Graph2d.js index 9bca8f61..a5498eb5 100644 --- a/lib/timeline/Graph2d.js +++ b/lib/timeline/Graph2d.js @@ -124,6 +124,8 @@ function Graph2d (container, items, groups, options) { if (items) { this.setItems(items); } + + // draw for the first time this._redraw(); } diff --git a/lib/timeline/Timeline.js b/lib/timeline/Timeline.js index c5c76cba..e2bfd555 100644 --- a/lib/timeline/Timeline.js +++ b/lib/timeline/Timeline.js @@ -157,9 +157,9 @@ function Timeline (container, items, groups, options) { if (items) { this.setItems(items); } - else { - this._redraw(); - } + + // draw for the first time + this._redraw(); } // Extend the functionality from Core