Closed MattyBearBytes closed 9 years ago
Line 1523 - Line 1528 of Timeline.Js has an iteration that sets the itemsHeight of each group to 0. There seems to be a TODO comment in there saying that it should check for a label.
if (groups) { // TODO: need to check if labels exists?
// loop through all groups to reset the items height
groups.forEach(function (group) {
group.itemsHeight = 0;
});
}
In removing that setting to 0, the problem goes away. Not understanding what this does exactly I'm going to submit a pull request that looks for a label before setting it to 0.
Each group in that "groups" variable has a property called "Content" containing the name of the group. If it contains a valid "Content" then I will prevent it from setting to 0.
Just found another (small) fix for this, initializing the itemsHeight with the height of the label instead of with zero.
Thanks @josdejong !
That definitely makes more sense.
Replicate with the following examples. Scroll to the right. The more you zoom in the less distance you need to travel away from the activities to get it to collapse in on itself.
http://almende.github.io/chap-links-library/js/timeline/examples/example13_grouping.html http://almende.github.io/chap-links-library/js/timeline/examples/example15_mobile.html
Didn't seem to be an issue in 2.4 but now an issue once updated to 2.9.