aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/css-panel.reel/css-panel.js
diff options
context:
space:
mode:
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.js55
1 files changed, 55 insertions, 0 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
new file mode 100644
index 00000000..21a466d5
--- /dev/null
+++ b/js/panels/css-panel/css-panel.reel/css-panel.js
@@ -0,0 +1,55 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component;
9
10exports.CSSPanelNew = Montage.create(Component, {
11 _resizedHeight : {
12 value: null
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 }
29 }
30 },
31
32
33 prepareForDraw : {
34 value: function() {
35 console.log("css panel : prepare for draw");
36 }
37 },
38 draw : {
39 value: function() {
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 }
53 }
54 }
55});