diff options
Diffstat (limited to 'js/controllers/styles-controller.js')
-rwxr-xr-x | js/controllers/styles-controller.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 2ff3e235..3a942364 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -53,11 +53,11 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
53 | ///// Bind app's activeDocument property to | 53 | ///// Bind app's activeDocument property to |
54 | ///// styles controller's _activeDocument property | 54 | ///// styles controller's _activeDocument property |
55 | 55 | ||
56 | Object.defineBinding(this, "activeDocument", { | 56 | // Object.defineBinding(this, "activeDocument", { |
57 | boundObject: this.application.ninja, | 57 | // boundObject: this.application.ninja, |
58 | boundObjectPropertyPath: "currentDocument", | 58 | // boundObjectPropertyPath: "currentDocument", |
59 | oneway: true | 59 | // oneway: true |
60 | }); | 60 | // }); |
61 | } | 61 | } |
62 | }, | 62 | }, |
63 | 63 | ||
@@ -79,7 +79,6 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
79 | return this._activeDocument; | 79 | return this._activeDocument; |
80 | }, | 80 | }, |
81 | set : function(document) { | 81 | set : function(document) { |
82 | |||
83 | ///// If the document is null set default stylesheets to null | 82 | ///// If the document is null set default stylesheets to null |
84 | 83 | ||
85 | if(!document) { | 84 | if(!document) { |
@@ -112,7 +111,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
112 | set : function(sheet) { | 111 | set : function(sheet) { |
113 | if(sheet) { | 112 | if(sheet) { |
114 | this._defaultStylesheet = sheet; | 113 | this._defaultStylesheet = sheet; |
115 | } else { | 114 | } else if(this._activeDocument.model && this._activeDocument.model.views && this._activeDocument.model.views.design){//check that the document has a design view |
116 | 115 | ||
117 | ///// Use the last stylesheet in the document as the default | 116 | ///// Use the last stylesheet in the document as the default |
118 | 117 | ||
@@ -1132,6 +1131,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
1132 | 1131 | ||
1133 | getMatrixFromElement : { | 1132 | getMatrixFromElement : { |
1134 | value: function(element, isStage) { | 1133 | value: function(element, isStage) { |
1134 | isStage = false; | ||
1135 | var xformStr = this.getElementStyle(element, "-webkit-transform", true, isStage), | 1135 | var xformStr = this.getElementStyle(element, "-webkit-transform", true, isStage), |
1136 | mat; | 1136 | mat; |
1137 | 1137 | ||
@@ -1165,6 +1165,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
1165 | 1165 | ||
1166 | getPerspectiveDistFromElement : { | 1166 | getPerspectiveDistFromElement : { |
1167 | value: function(element, isStage) { | 1167 | value: function(element, isStage) { |
1168 | isStage = false; | ||
1168 | var xformStr = this.getElementStyle(element, "-webkit-perspective", false, isStage), | 1169 | var xformStr = this.getElementStyle(element, "-webkit-perspective", false, isStage), |
1169 | dist; | 1170 | dist; |
1170 | 1171 | ||