aboutsummaryrefslogtreecommitdiff
path: root/js/components/treeview
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/treeview')
-rw-r--r--js/components/treeview/ninja-branch.reel/ninja-branch.css1
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.css1
-rw-r--r--js/components/treeview/ninja-leaf.reel/ninja-leaf.js10
-rw-r--r--js/components/treeview/tree-node.js2
4 files changed, 8 insertions, 6 deletions
diff --git a/js/components/treeview/ninja-branch.reel/ninja-branch.css b/js/components/treeview/ninja-branch.reel/ninja-branch.css
index d8c212e8..340233c7 100644
--- a/js/components/treeview/ninja-branch.reel/ninja-branch.css
+++ b/js/components/treeview/ninja-branch.reel/ninja-branch.css
@@ -26,7 +26,6 @@
26 cursor: pointer; 26 cursor: pointer;
27 font-weight: bold; 27 font-weight: bold;
28 padding: 3px 0 4px; 28 padding: 3px 0 4px;
29 text-shadow: 1px 1px 0 #000;
30} 29}
31 30
32/* First Level */ 31/* First Level */
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
index 085b11e0..fedc1d9d 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.css
@@ -19,7 +19,6 @@
19/* Second level */ 19/* Second level */
20.branch .branch .leaf-label { 20.branch .branch .leaf-label {
21 background-position: 25px center; 21 background-position: 25px center;
22 box-shadow: 0 3px 4px -4px rgba(0,0,0,0.2);
23 color: #FFF; 22 color: #FFF;
24 padding-left: 45px; 23 padding-left: 45px;
25} 24}
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js
index 0b7a171e..1bfe66a4 100644
--- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js
+++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js
@@ -36,14 +36,14 @@ exports.Leaf = Montage.create(TreeNode, {
36 handleEvent : { 36 handleEvent : {
37 value: function(e) { 37 value: function(e) {
38 var delegateMethod = this.delegateEventMap[e._event.type]; 38 var delegateMethod = this.delegateEventMap[e._event.type];
39 this.callDelegateMethod(delegateMethod); 39 this.callDelegateMethod(delegateMethod, e);
40 } 40 }
41 }, 41 },
42 callDelegateMethod : { 42 callDelegateMethod : {
43 value: function(methodName) { 43 value: function(methodName, evt) {
44 var delegate = this.treeView.contentController.delegate; 44 var delegate = this.treeView.contentController.delegate;
45 if(delegate && typeof delegate[methodName] === 'function') { 45 if(delegate && typeof delegate[methodName] === 'function') {
46 delegate[methodName](this.sourceObject); 46 delegate[methodName](this.sourceObject, evt);
47 } 47 }
48 } 48 }
49 }, 49 },
@@ -60,9 +60,11 @@ exports.Leaf = Montage.create(TreeNode, {
60 delegateEventMap : { 60 delegateEventMap : {
61 value: { 61 value: {
62 'click' : 'handleNodeActivation', 62 'click' : 'handleNodeActivation',
63 'dblclick' : 'handleDblclick',
63 'dragstart' : 'handleDragStart', 64 'dragstart' : 'handleDragStart',
64 'dragend' : 'handleDragEnd' 65 'dragend' : 'handleDragEnd'
65 } 66 },
67 distinct: true
66 } 68 }
67 69
68 70
diff --git a/js/components/treeview/tree-node.js b/js/components/treeview/tree-node.js
index 689fc233..d7b864b5 100644
--- a/js/components/treeview/tree-node.js
+++ b/js/components/treeview/tree-node.js
@@ -44,7 +44,9 @@ exports.TreeNode = Montage.create(Component, {
44 if(!object) { 44 if(!object) {
45 return; 45 return;
46 } 46 }
47
47 if(object[this.branchKey]) { 48 if(object[this.branchKey]) {
49 this.childNodes.length = 0;
48 object[this.branchKey].forEach(function(node) { 50 object[this.branchKey].forEach(function(node) {
49 this.childNodes.push(node); 51 this.childNodes.push(node);
50 }, this); 52 }, this);