aboutsummaryrefslogtreecommitdiff
path: root/js/ninja.reel/ninja.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-31 10:27:46 -0700
committerValerio Virgillito2012-05-31 10:27:46 -0700
commite1fe603a7c002073f8ac13623f8cc8dc43efb59d (patch)
tree38d9f7e00cc4a7b181ebe0029eaadcb46c70afb8 /js/ninja.reel/ninja.js
parent5b982abcfe51278062c06fde5fa7e5371f6aef54 (diff)
downloadninja-e1fe603a7c002073f8ac13623f8cc8dc43efb59d.tar.gz
fixing selection when switching documents
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/ninja.reel/ninja.js')
-rwxr-xr-xjs/ninja.reel/ninja.js22
1 files changed, 1 insertions, 21 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js
index 3c60bb41..4c1efff4 100755
--- a/js/ninja.reel/ninja.js
+++ b/js/ninja.reel/ninja.js
@@ -151,7 +151,6 @@ exports.Ninja = Montage.create(Component, {
151 } 151 }
152 }, 152 },
153 153
154
155 selectedElements: { 154 selectedElements: {
156 value: [] 155 value: []
157 }, 156 },
@@ -196,7 +195,6 @@ exports.Ninja = Montage.create(Component, {
196 195
197 this.eventManager.addEventListener("selectTool", this, false); 196 this.eventManager.addEventListener("selectTool", this, false);
198 this.eventManager.addEventListener("selectSubTool", this, false); 197 this.eventManager.addEventListener("selectSubTool", this, false);
199 this.eventManager.addEventListener("onSwitchDocument", this, false);
200 198
201 this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false); 199 this.addPropertyChangeListener("appModel.livePreview", this.executeLivePreview, false);
202 this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false); 200 this.addPropertyChangeListener("appModel.chromePreview", this.executeChromePreview, false);
@@ -311,15 +309,9 @@ exports.Ninja = Montage.create(Component, {
311 this.currentSelectedContainer = doc.model.documentRoot; 309 this.currentSelectedContainer = doc.model.documentRoot;
312 } 310 }
313 311
314// if(this.currentDocument.model.documentRoot) {
315// this.currentSelectedContainer = this.currentDocument.model.documentRoot;
316// } else {
317// alert("The current document has not loaded yet");
318// return;
319// }
320 312
321// this.appModel.show3dGrid = this.currentDocument.draw3DGrid; 313// this.appModel.show3dGrid = this.currentDocument.draw3DGrid;
322// NJevent("openDocument"); 314
323 315
324 } 316 }
325 }, 317 },
@@ -332,18 +324,6 @@ exports.Ninja = Montage.create(Component, {
332 } 324 }
333 }, 325 },
334 326
335 handleOnSwitchDocument: {
336 value: function() {
337 this.currentDocument = this.documentController.activeDocument;
338
339 if(this.currentDocument.model.documentRoot) {
340 this._currentSelectedContainer = this.selectionController._selectionContainer = this.currentDocument.model.documentRoot;
341 }
342
343 NJevent("switchDocument");
344 }
345 },
346
347 executeLivePreview: { 327 executeLivePreview: {
348 value: function() { 328 value: function() {
349 var background, overflow, transitionStopRule; 329 var background, overflow, transitionStopRule;