aboutsummaryrefslogtreecommitdiff
path: root/js/stage/layout.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage/layout.js')
-rw-r--r--js/stage/layout.js17
1 files changed, 5 insertions, 12 deletions
diff --git a/js/stage/layout.js b/js/stage/layout.js
index c369fc30..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
@@ -83,21 +83,14 @@ exports.Layout = Montage.create(Component, {
83 handleElementDeleted: { 83 handleElementDeleted: {
84 value: function(event) { 84 value: function(event) {
85 this.domTree.splice(this.domTree.indexOf(event.detail), 1); 85 this.domTree.splice(this.domTree.indexOf(event.detail), 1);
86
87 this.draw();
88 this.draw3DInfo(false);
89 } 86 }
90 }, 87 },
91 88
92 captureDeleteSelection: { 89 // Redraw stage only once after all deletion is completed
90 handleDeleteSelection: {
93 value: function(event) { 91 value: function(event) {
94 //this.redrawDocument(); 92 this.draw();
95 93 this.draw3DInfo(false);
96 var len = event.detail.length;
97 for(var i = 0; i < len ; i++) {
98 this.domTree.splice(this.domTree.indexOf(event.detail[i]),1);
99 }
100
101 } 94 }
102 }, 95 },
103 96