From a7f86ddfd880081d9f9474a97c8ea0f8c439bafb Mon Sep 17 00:00:00 2001 From: jos Date: Sat, 19 Mar 2016 20:52:04 +0100 Subject: [PATCH] Fixed #1697: Timeline not drawn when used within the Angular.js directive (re-committed this fix) --- HISTORY.md | 4 ++++ lib/timeline/Core.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 21843d97..0af9696f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,6 +4,10 @@ http://visjs.org ## not yet released, version 4.15.2-SNAPSHOT +### Timeline + +- Fixed #1697: Timeline not drawn when used within the Angular.js directive. + ## 2016-03-08, version 4.15.1 diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 97281b73..dc990b1d 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -633,7 +633,7 @@ Core.prototype._redraw = function() { var props = this.props; var dom = this.dom; - if (!dom|| !dom.container || dom.container.clientWidth == 0 ) return;// when destroyed, or invisible + if (!dom || !dom.container || dom.root.clientWidth == 0) return; // when destroyed, or invisible DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates);