aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/controllers/styles-controller.js6
-rwxr-xr-xjs/stage/stage.reel/stage.js4
2 files changed, 9 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 8d56370d..863348cd 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -160,6 +160,10 @@ 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);
163 } 167 }
164 }, 168 },
165 /* ----------------- Rule methods ----------------- */ 169 /* ----------------- Rule methods ----------------- */
@@ -1185,6 +1189,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1185 1189
1186 getMatrixFromElement : { 1190 getMatrixFromElement : {
1187 value: function(element, isStage) { 1191 value: function(element, isStage) {
1192 isStage = false;
1188 var xformStr = this.getElementStyle(element, "-webkit-transform", true, isStage), 1193 var xformStr = this.getElementStyle(element, "-webkit-transform", true, isStage),
1189 mat; 1194 mat;
1190 1195
@@ -1218,6 +1223,7 @@ var stylesController = exports.StylesController = Montage.create(Component, {
1218 1223
1219 getPerspectiveDistFromElement : { 1224 getPerspectiveDistFromElement : {
1220 value: function(element, isStage) { 1225 value: function(element, isStage) {
1226 isStage = false;
1221 var xformStr = this.getElementStyle(element, "-webkit-perspective", false, isStage), 1227 var xformStr = this.getElementStyle(element, "-webkit-perspective", false, isStage),
1222 dist; 1228 dist;
1223 1229
diff --git a/js/stage/stage.reel/stage.js b/js/stage/stage.reel/stage.js
index d8f7313b..4d9296a1 100755
--- a/js/stage/stage.reel/stage.js
+++ b/js/stage/stage.reel/stage.js
@@ -1090,7 +1090,9 @@ 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 this.snapManager.setupDragPlaneFromPlane (workingPlane); 1093 //TODO - StylesController needs to initialize the stage's styles prior to calling this.
1094 // So, moving this into styles-controller.initializeRootStyles code.
1095// this.snapManager.setupDragPlaneFromPlane (workingPlane);
1094 1096
1095 this.drawUtils.initializeFromDocument(); 1097 this.drawUtils.initializeFromDocument();
1096 } 1098 }