diff options
author | Jonathan Duran | 2012-06-05 08:42:53 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-05 08:42:53 -0700 |
commit | bd2c28100f347afc10243c80b8a288746370eee2 (patch) | |
tree | db507fe0fdbe8e6f98f7d0f022b29c8d5942b4f7 /js/panels/css-panel/styles-view-container.reel/styles-view-container.js | |
parent | 121d0e616f48aa7cd048763554089c20a1883d7a (diff) | |
parent | c1ec69879028220b0c3f11ad6e24035bf527802c (diff) | |
download | ninja-bd2c28100f347afc10243c80b8a288746370eee2.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into TimelineUber
Conflicts:
js/controllers/elements/element-controller.js
js/panels/Timeline/Layer.reel/Layer.js
js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/css-panel/styles-view-container.reel/styles-view-container.js')
-rw-r--r-- | js/panels/css-panel/styles-view-container.reel/styles-view-container.js | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js index 4a391421..157d99de 100644 --- a/js/panels/css-panel/styles-view-container.reel/styles-view-container.js +++ b/js/panels/css-panel/styles-view-container.reel/styles-view-container.js | |||
@@ -8,6 +8,29 @@ var Montage = require("montage/core/core").Montage, | |||
8 | Component = require("montage/ui/component").Component; | 8 | Component = require("montage/ui/component").Component; |
9 | 9 | ||
10 | exports.StylesViewContainer = Montage.create(Component, { | 10 | exports.StylesViewContainer = Montage.create(Component, { |
11 | |||
12 | _currentDocument: { | ||
13 | value : null | ||
14 | }, | ||
15 | |||
16 | currentDocument : { | ||
17 | get : function() { | ||
18 | return this._currentDocument; | ||
19 | }, | ||
20 | set : function(value) { | ||
21 | if (value === this._currentDocument) { | ||
22 | return; | ||
23 | } | ||
24 | |||
25 | this._currentDocument = value; | ||
26 | |||
27 | if(!value) { | ||
28 | this.hasStyles = false; | ||
29 | this.needsDraw = true; | ||
30 | } | ||
31 | } | ||
32 | }, | ||
33 | |||
11 | contentController : { | 34 | contentController : { |
12 | value: null | 35 | value: null |
13 | }, | 36 | }, |
@@ -74,7 +97,6 @@ exports.StylesViewContainer = Montage.create(Component, { | |||
74 | value: function() { | 97 | value: function() { |
75 | this.eventManager.addEventListener('styleSheetsReady', this, false); | 98 | this.eventManager.addEventListener('styleSheetsReady', this, false); |
76 | this.eventManager.addEventListener('elementChange', this, false); | 99 | this.eventManager.addEventListener('elementChange', this, false); |
77 | this.eventManager.addEventListener("closeDocument", this, false); | ||
78 | } | 100 | } |
79 | }, | 101 | }, |
80 | handleStyleSheetsReady: { | 102 | handleStyleSheetsReady: { |
@@ -150,13 +172,6 @@ exports.StylesViewContainer = Montage.create(Component, { | |||
150 | } | 172 | } |
151 | }, | 173 | }, |
152 | 174 | ||
153 | handleCloseDocument: { | ||
154 | value: function(e) { | ||
155 | this.hasStyles = false; | ||
156 | this.needsDraw = true; | ||
157 | } | ||
158 | }, | ||
159 | |||
160 | draw : { | 175 | draw : { |
161 | value: function() { | 176 | value: function() { |
162 | if(this.hasStyles) { | 177 | if(this.hasStyles) { |