diff options
Diffstat (limited to 'js/panels/css-panel/styles-view-container.reel')
-rw-r--r-- | js/panels/css-panel/styles-view-container.reel/styles-view-container.css | 1 | ||||
-rw-r--r-- | js/panels/css-panel/styles-view-container.reel/styles-view-container.js | 48 |
2 files changed, 4 insertions, 45 deletions
diff --git a/js/panels/css-panel/styles-view-container.reel/styles-view-container.css b/js/panels/css-panel/styles-view-container.reel/styles-view-container.css index 0b1aa892..5bc34d57 100644 --- a/js/panels/css-panel/styles-view-container.reel/styles-view-container.css +++ b/js/panels/css-panel/styles-view-container.reel/styles-view-container.css | |||
@@ -4,6 +4,7 @@ | |||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | 4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. |
5 | </copyright> */ | 5 | </copyright> */ |
6 | .sub-panel-slot { | 6 | .sub-panel-slot { |
7 | background-color: #FFF; | ||
7 | display: -webkit-box; | 8 | display: -webkit-box; |
8 | -webkit-box-orient: vertical; | 9 | -webkit-box-orient: vertical; |
9 | -webkit-box-flex: 1; | 10 | -webkit-box-flex: 1; |
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 7df39d39..0204d2b8 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 | |||
@@ -28,7 +28,6 @@ exports.StylesViewContainer = Montage.create(Component, { | |||
28 | }, | 28 | }, |
29 | templateDidLoad : { | 29 | templateDidLoad : { |
30 | value: function() { | 30 | value: function() { |
31 | console.log("styles view container - deserialized"); | ||
32 | this.eventManager.addEventListener('styleSheetsReady', this, false); | 31 | this.eventManager.addEventListener('styleSheetsReady', this, false); |
33 | } | 32 | } |
34 | }, | 33 | }, |
@@ -39,56 +38,15 @@ exports.StylesViewContainer = Montage.create(Component, { | |||
39 | }, | 38 | }, |
40 | handleSelectionChange: { | 39 | handleSelectionChange: { |
41 | value: function() { | 40 | value: function() { |
42 | var elements = this.application.ninja.selectedElements, | 41 | var elements = this.application.ninja.selectedElements; |
43 | type, selection, ruleList; | ||
44 | 42 | ||
45 | if(elements.length === 0) { | 43 | if(elements.length === 0) { return false; } |
46 | return false; | ||
47 | } else if(elements.length > 1) { | ||
48 | type = 'ELEMENTS'; | ||
49 | selection = elements; | ||
50 | } else { | ||
51 | type = 'ELEMENT'; | ||
52 | selection = elements[0]; | ||
53 | } | ||
54 | |||
55 | ruleList = this.ruleListContainer._getRuleList({ | ||
56 | selectionType : type, | ||
57 | selection : selection | ||
58 | }); | ||
59 | |||
60 | if(ruleList) { | ||
61 | this.ruleListContainer.displayedList = ruleList; | ||
62 | } else { | ||
63 | this.ruleListContainer.add(type, selection); | ||
64 | } | ||
65 | 44 | ||
45 | this.ruleListContainer.displayListForSelection(elements); | ||
66 | this.hasStyles = true; | 46 | this.hasStyles = true; |
67 | } | 47 | } |
68 | }, | 48 | }, |
69 | 49 | ||
70 | _ruleList : { | ||
71 | value: [] | ||
72 | }, | ||
73 | ruleList : { | ||
74 | get: function() { | ||
75 | return this._ruleList; | ||
76 | }, | ||
77 | set: function(list) { | ||
78 | if(!list) { | ||
79 | this._ruleList.length = 0; | ||
80 | return; | ||
81 | } | ||
82 | |||
83 | this._ruleList = list; | ||
84 | this.needsDraw = true; | ||
85 | } | ||
86 | }, | ||
87 | prepareForDraw : { | ||
88 | value: function() { | ||
89 | console.log("styles view container - prepare for draw"); | ||
90 | } | ||
91 | }, | ||
92 | draw : { | 50 | draw : { |
93 | value: function() { | 51 | value: function() { |
94 | if(this.hasStyles) { | 52 | if(this.hasStyles) { |