aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorAnanya Sen2012-02-08 15:37:23 -0800
committerAnanya Sen2012-02-08 15:37:23 -0800
commitab6f2f7ada39a9b27408575af9a565daf0a9d291 (patch)
tree92a796e34530d1a724ddb24ef22e59ffef13c12a /js/stage
parent36b2e540f06cef3887e7d0fea60527fee51e2a40 (diff)
parent5a69d5be181ea98fa842977885ebd8c861dda6ca (diff)
downloadninja-ab6f2f7ada39a9b27408575af9a565daf0a9d291.tar.gz
Merge branch 'FileIO' of github.com:joseeight/ninja-internal into FileIO
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/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 100755
--- 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