aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/styles-controller.js4
-rwxr-xr-xjs/ninja.reel/ninja.html14
-rwxr-xr-xjs/stage/stage.reel/stage.js4
-rwxr-xr-xjs/tools/RotateStage3DTool.js11
4 files changed, 19 insertions, 14 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 863348cd..83722184 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -160,10 +160,6 @@ var stylesController = exports.StylesController = Montage.create(Component, {
160 this.setStyles(rule, styles); 160 this.setStyles(rule, styles);
161 this.addClass(this.currentDocument.model.documentRoot, "ninja-body"); 161 this.addClass(this.currentDocument.model.documentRoot, "ninja-body");
162 } 162 }
163
164 //TODO - Temporarily moving this here so we guarantee the StylesController has a chance
165 // to initialize the stage's styles prior to doing any styles lookup.
166 this.application.ninja.stage.snapManager.setupDragPlaneFromPlane (workingPlane);
167 } 163 }
168 }, 164 },
169 /* ----------------- Rule methods ----------------- */ 165 /* ----------------- Rule methods ----------------- */
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html
index 0c0944e7..33c3080f 100755
--- a/js/ninja.reel/ninja.html
+++ b/js/ninja.reel/ninja.html
@@ -150,6 +150,13 @@
150 ] 150 ]
151 }, 151 },
152 152
153 "stylesController": {
154 "prototype": "js/controllers/styles-controller",
155 "bindings": {
156 "currentDocument": {"<-": "@documentList.selectedObjects.0"}
157 }
158 },
159
153 "stageMode": { 160 "stageMode": {
154 "prototype": "js/components/layout/stage-mode.reel", 161 "prototype": "js/components/layout/stage-mode.reel",
155 "properties": { 162 "properties": {
@@ -318,13 +325,6 @@
318 "prototype": "js/controllers/color-controller" 325 "prototype": "js/controllers/color-controller"
319 }, 326 },
320 327
321 "stylesController": {
322 "prototype": "js/controllers/styles-controller",
323 "bindings": {
324 "currentDocument": {"<-": "@documentList.selectedObjects.0"}
325 }
326 },
327
328 "presetsController": { 328 "presetsController": {
329 "prototype": "js/controllers/presets-controller" 329 "prototype": "js/controllers/presets-controller"
330 }, 330 },
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index 4d9296a1..d8f7313b 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -1090,9 +1090,7 @@ exports.Stage = Montage.create(Component, {
1090 1090
1091 this.snapManager._isCacheInvalid = true; 1091 this.snapManager._isCacheInvalid = true;
1092 this.snapManager.currentStage = this.currentDocument.model.documentRoot; 1092 this.snapManager.currentStage = this.currentDocument.model.documentRoot;
1093 //TODO - StylesController needs to initialize the stage's styles prior to calling this. 1093 this.snapManager.setupDragPlaneFromPlane (workingPlane);
1094 // So, moving this into styles-controller.initializeRootStyles code.
1095// this.snapManager.setupDragPlaneFromPlane (workingPlane);
1096 1094
1097 this.drawUtils.initializeFromDocument(); 1095 this.drawUtils.initializeFromDocument();
1098 } 1096 }
diff --git a/js/tools/RotateStage3DTool.js b/js/tools/RotateStage3DTool.js
index 12b21a64..9e117837 100755
--- a/js/tools/RotateStage3DTool.js
+++ b/js/tools/RotateStage3DTool.js
@@ -85,6 +85,12 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, {
85 } 85 }
86 }, 86 },
87 87
88 captureSelectionChange: {
89 value: function(event){
90 this.eventManager.addEventListener("selectionDrawn", this, true);
91 }
92 },
93
88 captureSelectionDrawn: { 94 captureSelectionDrawn: {
89 value: function(event){ 95 value: function(event){
90 this._origin = null; 96 this._origin = null;
@@ -114,6 +120,11 @@ exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, {
114 this._origin = viewUtils.localToGlobal(eltCtr, stage); 120 this._origin = viewUtils.localToGlobal(eltCtr, stage);
115 this._setTransformOrigin(false); 121 this._setTransformOrigin(false);
116 this.DrawHandles(); 122 this.DrawHandles();
123
124 if(event)
125 {
126 this.eventManager.removeEventListener("selectionDrawn", this, true);
127 }
117 } 128 }
118 }, 129 },
119 130