Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Timeline subgroups position bug after collapsing parent group #33

Closed
Chanyaaa opened this issue Sep 6, 2018 · 3 comments
Closed

Timeline subgroups position bug after collapsing parent group #33

Chanyaaa opened this issue Sep 6, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@Chanyaaa
Copy link

Chanyaaa commented Sep 6, 2018

I'm facing a problem when I have 3 or more levels of nested groups. If I'm trying to collapse first level then third level is not collapsed and placed at the top of the timeline.
As a quick fix I did small change in the logic to collapse all subgroups at _onGroupClick:

 var getAllNestedGroups = function(groupId){
    var curGroup = groupsData.get(groupId);
    if(!curGroup.nestedGroups) {
      return;
    }
    var subgroups = curGroup.nestedGroups;
    curGroup.nestedGroups.forEach(function (g){
        var sbgrps = getAllNestedGroups(g);
		if(sbgrps){
		    subgroups = subgroups.concat(sbgrps);
		}
    });
    return subgroups;
  }
  
  var nestedGroups = groupsData.get(getAllNestedGroups(group.groupId)).map(function (nestedGroup) {
    nestedGroup.visible = nestingGroup.showNested;
    return nestedGroup;
  });
@Chanyaaa Chanyaaa changed the title Timeline subgroups position bug when n Timeline subgroups position bug after collapsing parent group Sep 6, 2018
@yotamberk
Copy link
Owner

Thanks for reporting. I'll be on it this week

@yotamberk yotamberk added bug Something isn't working duplicate This issue or pull request already exists labels Sep 7, 2018
@yotamberk
Copy link
Owner

@Chanyaaa Can you add a jsbin to replicate this bug?

@yotamberk yotamberk removed the duplicate This issue or pull request already exists label Sep 18, 2018
@yotamberk
Copy link
Owner

fixed with #48

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants