diff options
author | Eric Guzman | 2012-05-17 16:05:26 -0700 |
---|---|---|
committer | Eric Guzman | 2012-05-17 16:05:26 -0700 |
commit | 4e43fe2c97833c0847a53484c9589697e64137dc (patch) | |
tree | d9b2b0d306e44ca57f12782ec81a0788c8e94a6c /js/controllers | |
parent | 4e23fee56acb23bf36e6638641dfa5071e2f458a (diff) | |
download | ninja-4e43fe2c97833c0847a53484c9589697e64137dc.tar.gz |
Styles Controller - Null out active document
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/styles-controller.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 22f29bd8..c8b9376e 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -83,6 +83,11 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
83 | ///// If the document is null set default stylesheets to null | 83 | ///// If the document is null set default stylesheets to null |
84 | 84 | ||
85 | if(!document) { | 85 | if(!document) { |
86 | this._activeDocument = null; | ||
87 | this._stageStylesheet = null; | ||
88 | this.defaultStylesheet = null; | ||
89 | this.userStyleSheets = []; | ||
90 | this.clearDirtyStyleSheets(); | ||
86 | return false; | 91 | return false; |
87 | } | 92 | } |
88 | 93 | ||
@@ -120,7 +125,10 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
120 | if(sheet) { | 125 | if(sheet) { |
121 | this._defaultStylesheet = sheet; | 126 | this._defaultStylesheet = sheet; |
122 | } else { | 127 | } else { |
123 | 128 | if(sheet === null) { | |
129 | this._defaultStylesheet = null; | ||
130 | return false; | ||
131 | } | ||
124 | ///// Use the last stylesheet in the document as the default | 132 | ///// Use the last stylesheet in the document as the default |
125 | 133 | ||
126 | var sheets = this._activeDocument._document.styleSheets, | 134 | var sheets = this._activeDocument._document.styleSheets, |