diff options
author | Pushkar Joshi | 2012-04-17 14:49:18 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-04-17 14:49:18 -0700 |
commit | df903a01e14134cadf109b733d09c6eadfa3966b (patch) | |
tree | 2351f1c05b2f852053fa0be533072088a9ad4e7c /js/panels | |
parent | 036cf034e124dbc1f4893e90f7c6d240904a3faf (diff) | |
parent | cacb4a21825818af392c2949967b0f3c1df509c5 (diff) | |
download | ninja-df903a01e14134cadf109b733d09c6eadfa3966b.tar.gz |
Merge branch 'master' into pentool
Conflicts:
js/tools/PenTool.js
Diffstat (limited to 'js/panels')
18 files changed, 356 insertions, 20 deletions
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.css b/js/panels/Materials/materials-popup.reel/materials-popup.css index 89233c64..2d339411 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.css +++ b/js/panels/Materials/materials-popup.reel/materials-popup.css | |||
@@ -37,21 +37,53 @@ | |||
37 | .mp_property | 37 | .mp_property |
38 | { | 38 | { |
39 | height:40px; | 39 | height:40px; |
40 | position: relative; | ||
40 | } | 41 | } |
41 | 42 | ||
42 | .mp_property > .prop-label | 43 | .mp_property > .prop-label |
43 | { | 44 | { |
44 | float: left; | 45 | position:relative; |
45 | /*width:86px;*/ | 46 | top:12px; |
46 | margin: 0px 8px 2px 5px; | 47 | float: left; |
48 | width: 100px; | ||
47 | } | 49 | } |
48 | 50 | ||
49 | .mp_property > .prop-controller | 51 | .mp_property > .prop-controller |
50 | { | 52 | { |
51 | float: right; | 53 | position:relative; |
52 | clear: left; | 54 | top:12px; |
53 | width: auto; | 55 | left: 10px; |
54 | margin: 0px 0px 3px 0px; | 56 | float: left; |
57 | } | ||
58 | |||
59 | .mp_property .hottext, | ||
60 | .mp_property .hottextInput | ||
61 | { | ||
62 | width: 30px; | ||
63 | } | ||
64 | |||
65 | .mp_property .button | ||
66 | { | ||
67 | width: 30px; | ||
68 | height: 20px; | ||
69 | } | ||
70 | |||
71 | .mp_property .inputRow | ||
72 | { | ||
73 | top: 8px; | ||
74 | position: relative; | ||
75 | } | ||
76 | |||
77 | .mp_properties_list | ||
78 | { | ||
79 | padding-bottom: 8px; | ||
80 | } | ||
81 | |||
82 | .mp_properties_list > .mp_property > .colortoolbar | ||
83 | { | ||
84 | width: 27px !important; | ||
85 | height: 27px !important; | ||
86 | overflow:hidden !important; | ||
55 | } | 87 | } |
56 | 88 | ||
57 | .mp_buttons { | 89 | .mp_buttons { |
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.html b/js/panels/Materials/materials-popup.reel/materials-popup.html index 34f68554..ae0ee2c8 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.html +++ b/js/panels/Materials/materials-popup.reel/materials-popup.html | |||
@@ -104,7 +104,7 @@ | |||
104 | 104 | ||
105 | <hr /> | 105 | <hr /> |
106 | 106 | ||
107 | <div id="mp_properties_list" class="mp_properties_list" style="-webkit-user-select: none;"> | 107 | <div id="mp_properties_list" class="mp_properties_list"> |
108 | <div id="mp_property" class="mp_property"></div> | 108 | <div id="mp_property" class="mp_property"></div> |
109 | </div> | 109 | </div> |
110 | 110 | ||
diff --git a/js/panels/Materials/materials-popup.reel/materials-popup.js b/js/panels/Materials/materials-popup.reel/materials-popup.js index b44761bc..bbccf45d 100755 --- a/js/panels/Materials/materials-popup.reel/materials-popup.js +++ b/js/panels/Materials/materials-popup.reel/materials-popup.js | |||
@@ -237,7 +237,7 @@ exports.MaterialsPopup = Montage.create(Component, { | |||
237 | } | 237 | } |
238 | else | 238 | else |
239 | { | 239 | { |
240 | this.materialsData = this._dummyData1; | 240 | this.materialsData = this._dummyData1.slice(0); |
241 | } | 241 | } |
242 | 242 | ||
243 | this.needsDraw = true; | 243 | this.needsDraw = true; |
diff --git a/js/panels/Panel.reel/Panel.js b/js/panels/Panel.reel/Panel.js index 33f9b3a7..613bef4b 100755 --- a/js/panels/Panel.reel/Panel.js +++ b/js/panels/Panel.reel/Panel.js | |||
@@ -125,7 +125,10 @@ exports.Panel = Montage.create(Component, { | |||
125 | require.async(this.modulePath) | 125 | require.async(this.modulePath) |
126 | .then(function(panelContent) { | 126 | .then(function(panelContent) { |
127 | var componentRequire = panelContent[that.moduleName]; | 127 | var componentRequire = panelContent[that.moduleName]; |
128 | that.panelContent.content = componentRequire.create(); | 128 | var componentInstance = componentRequire.create(); |
129 | |||
130 | componentInstance.ownerComponent = that.ownerComponent; | ||
131 | that.panelContent.content = componentInstance; | ||
129 | }) | 132 | }) |
130 | .end(); | 133 | .end(); |
131 | } | 134 | } |
diff --git a/js/panels/PanelContainer.reel/PanelContainer.html b/js/panels/PanelContainer.reel/PanelContainer.html index 251e86e4..d3673105 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.html +++ b/js/panels/PanelContainer.reel/PanelContainer.html | |||
@@ -62,6 +62,13 @@ | |||
62 | } | 62 | } |
63 | }, | 63 | }, |
64 | 64 | ||
65 | "panel_6": { | ||
66 | "prototype": "js/panels/Panel.reel", | ||
67 | "properties": { | ||
68 | "element": {"#": "panel_6"} | ||
69 | } | ||
70 | }, | ||
71 | |||
65 | "owner": { | 72 | "owner": { |
66 | "module": "js/panels/PanelContainer.reel", | 73 | "module": "js/panels/PanelContainer.reel", |
67 | "name": "PanelContainer", | 74 | "name": "PanelContainer", |
@@ -74,7 +81,8 @@ | |||
74 | "panel_2": {"@": "panel_2"}, | 81 | "panel_2": {"@": "panel_2"}, |
75 | "panel_3": {"@": "panel_3"}, | 82 | "panel_3": {"@": "panel_3"}, |
76 | "panel_4": {"@": "panel_4"}, | 83 | "panel_4": {"@": "panel_4"}, |
77 | "panel_5": {"@": "panel_5"} | 84 | "panel_5": {"@": "panel_5"}, |
85 | "panel_6": {"@": "panel_6"} | ||
78 | }, | 86 | }, |
79 | "listeners": [ | 87 | "listeners": [ |
80 | { | 88 | { |
@@ -104,6 +112,7 @@ | |||
104 | <article data-montage-id="panel_3"></article> | 112 | <article data-montage-id="panel_3"></article> |
105 | <article data-montage-id="panel_4"></article> | 113 | <article data-montage-id="panel_4"></article> |
106 | <article data-montage-id="panel_5"></article> | 114 | <article data-montage-id="panel_5"></article> |
115 | <article data-montage-id="panel_6"></article> | ||
107 | </article> | 116 | </article> |
108 | </section> | 117 | </section> |
109 | </body> | 118 | </body> |
diff --git a/js/panels/PanelContainer.reel/PanelContainer.js b/js/panels/PanelContainer.reel/PanelContainer.js index c40bbc21..8d1d6a5e 100755 --- a/js/panels/PanelContainer.reel/PanelContainer.js +++ b/js/panels/PanelContainer.reel/PanelContainer.js | |||
@@ -45,6 +45,7 @@ exports.PanelContainer = Montage.create(Component, { | |||
45 | this['panel_'+i].minHeight= p.minHeight; | 45 | this['panel_'+i].minHeight= p.minHeight; |
46 | this['panel_'+i].maxHeight = p.maxHeight; | 46 | this['panel_'+i].maxHeight = p.maxHeight; |
47 | this['panel_'+i].flexible = p.flexible; | 47 | this['panel_'+i].flexible = p.flexible; |
48 | this['panel_'+i].collapsed = p.collapsed; | ||
48 | this['panel_'+i].modulePath = p.modulePath; | 49 | this['panel_'+i].modulePath = p.modulePath; |
49 | this['panel_'+i].moduleName = p.moduleName; | 50 | this['panel_'+i].moduleName = p.moduleName; |
50 | this['panel_'+i].disabled = true; | 51 | this['panel_'+i].disabled = true; |
diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index ac45b4ba..98ebb36a 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js | |||
@@ -55,7 +55,7 @@ exports.Splitter = Montage.create(Component, { | |||
55 | }, | 55 | }, |
56 | set: function(value) { | 56 | set: function(value) { |
57 | this._collapsed = value; | 57 | this._collapsed = value; |
58 | this.needsDraw = true; | 58 | |
59 | this.application.localStorage.setItem(this.element.getAttribute("data-montage-id"), {"version": this.version, "value": value}); | 59 | this.application.localStorage.setItem(this.element.getAttribute("data-montage-id"), {"version": this.version, "value": value}); |
60 | } | 60 | } |
61 | }, | 61 | }, |
diff --git a/js/panels/components-panel.reel/components-panel.js b/js/panels/components-panel.reel/components-panel.js index acbf702f..cfacd461 100755 --- a/js/panels/components-panel.reel/components-panel.js +++ b/js/panels/components-panel.reel/components-panel.js | |||
@@ -286,9 +286,7 @@ exports.ComponentsPanel = Montage.create(Component, { | |||
286 | var styles = { | 286 | var styles = { |
287 | 'position': 'absolute', | 287 | 'position': 'absolute', |
288 | 'left' : that.dragPosition[0] + 'px', | 288 | 'left' : that.dragPosition[0] + 'px', |