diff options
author | Valerio Virgillito | 2012-06-01 08:10:11 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-01 08:10:11 -0700 |
commit | f457f110e560d50cb12f4cd3c4859bfc42a0ef3d (patch) | |
tree | cc2b387c796b0f34f1ab00a7c542c335d52005e9 /js | |
parent | 7fcb10270f9e19415f8452c261c2d0c86916a29a (diff) | |
parent | 69ca67093bb53188dca5437e0bfbfb7f676ada85 (diff) | |
download | ninja-f457f110e560d50cb12f4cd3c4859bfc42a0ef3d.tar.gz |
Merge pull request #6 from mqg734/dom-architecture-pentool
We were not saving all the necessary styles for the body.
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/styles-controller.js | 6 | ||||
-rwxr-xr-x | js/stage/stage.reel/stage.js | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 86df82de..14857bf9 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -179,6 +179,10 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
179 | this.setStyles(rule, styles); | 179 | this.setStyles(rule, styles); |
180 | this.addClass(this.currentDocument.model.documentRoot, "ninja-body"); | 180 | this.addClass(this.currentDocument.model.documentRoot, "ninja-body"); |
181 | } | 181 | } |
182 | |||
183 | //TODO - Temporarily moving this here so we guarantee the StylesController has a chance | ||
184 | // to initialize the stage's styles prior to doing any styles lookup. | ||
185 | this.application.ninja.stage.snapManager.setupDragPlaneFromPlane (workingPlane); | ||
182 | } | 186 | } |
183 | }, | 187 | }, |
184 | /* ----------------- Rule methods ----------------- */ | 188 | /* ----------------- Rule methods ----------------- */ |
@@ -1204,6 +1208,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
1204 | 1208 | ||
1205 | getMatrixFromElement : { | 1209 | getMatrixFromElement : { |
1206 | value: function(element, isStage) { | 1210 | value: function(element, isStage) { |
1211 | isStage = false; | ||
1207 | var xformStr = this.getElementStyle(element, "-webkit-transform", true, isStage), | 1212 | var xformStr = this.getElementStyle(element, "-webkit-transform", true, isStage), |
1208 | mat; | 1213 | mat; |
1209 | 1214 | ||
@@ -1237,6 +1242,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
1237 | 1242 | ||
1238 | getPerspectiveDistFromElement : { | 1243 | getPerspectiveDistFromElement : { |
1239 | value: function(element, isStage) { | 1244 | value: function(element, isStage) { |
1245 | isStage = false; | ||
1240 | var xformStr = this.getElementStyle(element, "-webkit-perspective", false, isStage), | 1246 | var xformStr = this.getElementStyle(element, "-webkit-perspective", false, isStage), |
1241 | dist; | 1247 | dist; |
1242 | 1248 | ||
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 | } |