aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/stage-deps.js13
-rwxr-xr-xjs/stage/stage-view.reel/stage-view.js22
2 files changed, 5 insertions, 30 deletions
diff --git a/js/stage/stage-deps.js b/js/stage/stage-deps.js
index 17039438..84f04249 100755
--- a/js/stage/stage-deps.js
+++ b/js/stage/stage-deps.js
@@ -55,8 +55,9 @@ exports.StageDeps = Montage.create(Component, {
55 deserializedFromTemplate: { 55 deserializedFromTemplate: {
56 value: function() { 56 value: function() {
57 57
58 this.eventManager.addEventListener( "appLoaded", this, false); 58 this.eventManager.addEventListener("appLoaded", this, false);
59 this.eventManager.addEventListener( "openDocument", this, false); 59 this.eventManager.addEventListener("openDocument", this, false);
60 this.eventManager.addEventListener("switchDocument", this, false);
60 61
61 // Initialize Deps 62 // Initialize Deps
62 // HACK 63 // HACK
@@ -111,9 +112,8 @@ exports.StageDeps = Montage.create(Component, {
111 } 112 }
112 }, 113 },
113 114
114 reinitializeForSwitchDocument: { 115 handleSwitchDocument: {
115 value: function() { 116 value: function(){
116
117 workingPlane = [0,0,1,0]; 117 workingPlane = [0,0,1,0];
118 118
119 snapManager._isCacheInvalid = true; 119 snapManager._isCacheInvalid = true;
@@ -122,7 +122,4 @@ exports.StageDeps = Montage.create(Component, {
122 drawUtils.initializeFromDocument(); 122 drawUtils.initializeFromDocument();
123 } 123 }
124 } 124 }
125
126
127
128}); \ No newline at end of file 125}); \ No newline at end of file
diff --git a/js/stage/stage-view.reel/stage-view.js b/js/stage/stage-view.reel/stage-view.js
index ba94fadf..757c5e51 100755
--- a/js/stage/stage-view.reel/stage-view.js
+++ b/js/stage/stage-view.reel/stage-view.js
@@ -112,28 +112,6 @@ exports.StageView = Montage.create(Component, {
112 */ 112 */
113 switchDocument:{ 113 switchDocument:{
114 value: function(doc){ 114 value: function(doc){
115 this.application.ninja.documentController._hideCurrentDocument();
116 this.application.ninja.documentController.activeDocument = doc;
117
118 if(this.application.ninja.documentController.activeDocument.currentView === "design") {
119 this.application.ninja.currentDocument = this.application.ninja.documentController.activeDocument;
120 }
121
122 this.application.ninja.stage._scrollFlag = false; // TODO HACK to prevent type error on Hide/Show Iframe
123
124
125// this.application.ninja.documentController._showCurrentDocument();
126 // Inline function below
127 if(this.activeDocument) {
128 this.activeDocument.container.style["display"] = "block";
129 if(this.activeDocument.currentView === "design"){
130 this.activeDocument.container.parentNode.style["display"] = "block";
131 this.activeDocument.restoreAppState();
132 } else {
133 //hide the iframe when switching to code view
134 document.getElementById("iframeContainer").style.display = "none";
135 }
136 }
137 115
138 116
139 //focus editor 117 //focus editor