{"action":"opened","issue":{"url":"https://api.github.com/repos/fperucic/treant-js/issues/36","repository_url":"https://api.github.com/repos/fperucic/treant-js","labels_url":"https://api.github.com/repos/fperucic/treant-js/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/fperucic/treant-js/issues/36/comments","events_url":"https://api.github.com/repos/fperucic/treant-js/issues/36/events","html_url":"https://github.com/fperucic/treant-js/issues/36","id":181256909,"number":36,"title":"Is there a way to collapse all nodes at once (toggle)","user":{"login":"rurikCL","id":3808971,"avatar_url":"https://avatars.githubusercontent.com/u/3808971?v=3","gravatar_id":"","url":"https://api.github.com/users/rurikCL","html_url":"https://github.com/rurikCL","followers_url":"https://api.github.com/users/rurikCL/followers","following_url":"https://api.github.com/users/rurikCL/following{/other_user}","gists_url":"https://api.github.com/users/rurikCL/gists{/gist_id}","starred_url":"https://api.github.com/users/rurikCL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rurikCL/subscriptions","organizations_url":"https://api.github.com/users/rurikCL/orgs","repos_url":"https://api.github.com/users/rurikCL/repos","events_url":"https://api.github.com/users/rurikCL/events{/privacy}","received_events_url":"https://api.github.com/users/rurikCL/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T20:26:43Z","updated_at":"2016-10-05T20:26:43Z","closed_at":null,"body":"Is there any way to collapse all nodes at once via public method or a config to let only one node collapse at a time.\r\n\r\ni added a caret icon to the <a> switch via:\r\n`// COLLAPSE ICON\r\n        $(\"a.collapse-switch\").html(\"<span class='glyphicon glyphicon-triangle-bottom' style='color:#fff'></span>\")\r\n            .on('click',function (e) {\r\n                if($(this).find('span').hasClass('glyphicon-triangle-bottom')){\r\n                    $(this).find('span').removeClass('glyphicon-triangle-bottom').addClass('glyphicon-triangle-top');\r\n                }else{\r\n                    $(this).find('span').removeClass('glyphicon-triangle-top').addClass('glyphicon-triangle-bottom');\r\n\r\n                }\r\n            });`\r\n\r\nso, the idea is to hide all other collapsed branches, when one collapse.\r\ni also tried calling the click event on other uncollapsed branches, but doesn't work.\r\n\r\nthis would be an interesting option to implement.\r\n\r\n"}}
{"actor":{"display_login":"rurikCL"}}