Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Fix according to latest comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zaggino committed Mar 24, 2014
1 parent 151f3c1 commit f265e74
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,18 +684,18 @@ define(function (require, exports, module) {
};
var createCustomHandler = function(originalHandler) {
return function (event) {
var $node = $(event.target).parent("li");
var $node = $(event.target).parent("li"),
methodName;
if (event.ctrlKey || event.metaKey) {
if (event.altKey) {
// collapse subtree
// note: expanding using open_all is a bad idea due to poor performance
if ($node.is(".jstree-open")) {
_projectTree.jstree("close_all", $node);
return;
}
methodName = $node.is(".jstree-open") ? "close_all" : "open_node";
_projectTree.jstree(methodName, $node);
return;
} else {
// toggle siblings
var methodName = $node.is(".jstree-open") ? "close_node" : "open_node";
methodName = $node.is(".jstree-open") ? "close_node" : "open_node";
$node.parent().children("li").each(function () {
_projectTree.jstree(methodName, $(this));
});
Expand Down

0 comments on commit f265e74

Please sign in to comment.