From 9783275be630b4d1936a7b9585252e890a559d10 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 8 Oct 2014 15:49:44 +0800 Subject: [PATCH] #325 Timeline - Prevent collapsing of groups when scrolling beyond data Related to issue #325 (https://github.com/almende/chap-links-library/issues/325) --- js/src/timeline/timeline.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/src/timeline/timeline.js b/js/src/timeline/timeline.js index 77b0350..6c45983 100755 --- a/js/src/timeline/timeline.js +++ b/js/src/timeline/timeline.js @@ -1520,10 +1520,12 @@ links.Timeline.prototype.reflowItems = function() { groups = this.groups, renderedItems = this.renderedItems; - if (groups) { // TODO: need to check if labels exists? - // loop through all groups to reset the items height + if (groups) { + // loop through all groups to reset the items height if group has no content groups.forEach(function (group) { - group.itemsHeight = 0; + if (!group.content) { + group.itemsHeight = 0; + } }); }