Browse Source

Fixed #1697: Timeline not drawn when used within the Angular.js directive (re-committed this fix)

codeClimate
jos 8 years ago
parent
commit
a7f86ddfd8
2 changed files with 5 additions and 1 deletions
  1. +4
    -0
      HISTORY.md
  2. +1
    -1
      lib/timeline/Core.js

+ 4
- 0
HISTORY.md View File

@ -4,6 +4,10 @@ http://visjs.org
## not yet released, version 4.15.2-SNAPSHOT ## 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 ## 2016-03-08, version 4.15.1

+ 1
- 1
lib/timeline/Core.js View File

@ -633,7 +633,7 @@ Core.prototype._redraw = function() {
var props = this.props; var props = this.props;
var dom = this.dom; 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); DateUtil.updateHiddenDates(this.options.moment, this.body, this.options.hiddenDates);

Loading…
Cancel
Save