diff options
Diffstat (limited to 'js/panels/css-panel/css-panel.reel/css-panel.js')
-rw-r--r-- | js/panels/css-panel/css-panel.reel/css-panel.js | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/js/panels/css-panel/css-panel.reel/css-panel.js b/js/panels/css-panel/css-panel.reel/css-panel.js index 228e91f6..21a466d5 100644 --- a/js/panels/css-panel/css-panel.reel/css-panel.js +++ b/js/panels/css-panel/css-panel.reel/css-panel.js | |||
@@ -8,11 +8,28 @@ 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.CSSPanelNew = Montage.create(Component, { | 10 | exports.CSSPanelNew = Montage.create(Component, { |
11 | templateDidLoad : { | 11 | _resizedHeight : { |
12 | value: function() { | 12 | value: null |
13 | console.log("css panel : template did load"); | 13 | }, |
14 | isResizing : { | ||
15 | value: null | ||
16 | }, | ||
17 | _height: { | ||
18 | value: null | ||
19 | }, | ||
20 | height: { | ||
21 | get: function() { | ||
22 | return this._height; | ||
23 | }, | ||
24 | set: function(val) { | ||
25 | if(this._height !== val) { | ||
26 | this._height = val; | ||
27 | this.needsDraw = true; | ||
28 | } | ||
14 | } | 29 | } |
15 | }, | 30 | }, |
31 | |||
32 | |||
16 | prepareForDraw : { | 33 | prepareForDraw : { |
17 | value: function() { | 34 | value: function() { |
18 | console.log("css panel : prepare for draw"); | 35 | console.log("css panel : prepare for draw"); |
@@ -20,7 +37,19 @@ exports.CSSPanelNew = Montage.create(Component, { | |||
20 | }, | 37 | }, |
21 | draw : { | 38 | draw : { |
22 | value: function() { | 39 | value: function() { |
23 | console.log("css panel : draw"); | 40 | console.log("css panel : draw. height: ", this.height); |
41 | |||
42 | // if(this.height) { | ||
43 | // console.log("CSS Panel draw - resizing to", (this.height + this._resizedHeight) + "px"); | ||
44 | // this.styleSheetsView.element.style.height = (this.height + this._resizedHeight) + "px"; | ||
45 | // } | ||
46 | } | ||
47 | }, | ||
48 | didDraw: { | ||
49 | value: function() { | ||
50 | if(!this.isResizing) { | ||
51 | //this.height = this.element.offsetHeight; | ||
52 | } | ||
24 | } | 53 | } |
25 | } | 54 | } |
26 | }); | 55 | }); |