aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorhwc4872012-02-03 15:24:23 -0800
committerhwc4872012-02-03 15:24:23 -0800
commitb8092d97bf4488cc733bd39365a7a0b0e0f554b2 (patch)
treeaf36c056294e4b7ad5d67d8f4914b08c78d48fac /js/stage
parent3d5b5f7c5efb25b5e605d5d120b57f2dde33fd23 (diff)
parent4b8eb7442b41db7e06b639ba4a31bb7664209159 (diff)
downloadninja-b8092d97bf4488cc733bd39365a7a0b0e0f554b2.tar.gz
Merge branch 'ToolFixes' of github.com:mqg734/ninja-internal into working
Diffstat (limited to 'js/stage')
-rw-r--r--js/stage/layout.js19
1 files changed, 8 insertions, 11 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js
index dd5be081..1a491210 100644
--- a/js/stage/layout.js
+++ b/js/stage/layout.js
@@ -58,7 +58,7 @@ exports.Layout = Montage.create(Component, {
58 58
59 this.eventManager.addEventListener("selectionChange", this, false); 59 this.eventManager.addEventListener("selectionChange", this, false);
60 60
61 this.eventManager.addEventListener("deleteSelection", this, true); 61 this.eventManager.addEventListener("deleteSelection", this, false);
62 62
63// this.addEventListener("change@stage.appModel.layoutView", this.handleLayoutView, false); 63// this.addEventListener("change@stage.appModel.layoutView", this.handleLayoutView, false);
64 64
@@ -74,26 +74,23 @@ exports.Layout = Montage.create(Component, {
74 handleElementAdded: { 74 handleElementAdded: {
75 value: function(event) { 75 value: function(event) {
76 this.domTree.push(event.detail); 76 this.domTree.push(event.detail);
77
78 this.draw();
79 this.draw3DInfo(false);
77 } 80 }
78 }, 81 },
79 82
80 handleElementDeleted: { 83 handleElementDeleted: {
81 value: function(event) { 84 value: function(event) {
82 this.domTree.splice(this.domTree.indexOf(event.detail), 1); 85 this.domTree.splice(this.domTree.indexOf(event.detail), 1);
83
84 this.draw();
85 } 86 }
86 }, 87 },
87 88
88 captureDeleteSelection: { 89 // Redraw stage only once after all deletion is completed
90 handleDeleteSelection: {
89 value: function(event) { 91 value: function(event) {
90 //this.redrawDocument(); 92 this.draw();
91 93 this.draw3DInfo(false);
92 var len = event.detail.length;
93 for(var i = 0; i < len ; i++) {
94 this.domTree.splice(this.domTree.indexOf(event.detail[i]),1);
95 }
96
97 } 94 }
98 }, 95 },
99 96