diff options
author | Valerio Virgillito | 2012-02-08 10:18:36 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-08 10:18:36 -0800 |
commit | 763910b9d074137eb7dee80447b89407ce5750c9 (patch) | |
tree | 3c8820a06afd442fa5ba8e68665a4d2836230628 /js/components/tools-properties/fill-properties.reel | |
parent | e5579374ff39b80b8c0c69faba37f6f581758fe0 (diff) | |
parent | 329a859e2666716c3a1d99c6bd2679e10c81fc8d (diff) | |
download | ninja-763910b9d074137eb7dee80447b89407ce5750c9.tar.gz |
Merge pull request #20 from mqg734/ToolFixes
Hooked up materials code to go through the ShapesController and updated the PI to reflect the currently selected shape's materials. Also fixed the following bugs:
Diffstat (limited to 'js/components/tools-properties/fill-properties.reel')
-rw-r--r-- | js/components/tools-properties/fill-properties.reel/fill-properties.html | 11 | ||||
-rw-r--r-- | js/components/tools-properties/fill-properties.reel/fill-properties.js | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.html b/js/components/tools-properties/fill-properties.reel/fill-properties.html index d09b7f44..a35f9b15 100644 --- a/js/components/tools-properties/fill-properties.reel/fill-properties.html +++ b/js/components/tools-properties/fill-properties.reel/fill-properties.html | |||
@@ -11,6 +11,15 @@ | |||
11 | 11 | ||
12 | <script type="text/montage-serialization"> | 12 | <script type="text/montage-serialization"> |
13 | { | 13 | { |
14 | "_fillMaterialCB": { | ||
15 | "module": "js/components/combobox.reel", | ||
16 | "name": "Combobox", | ||
17 | "properties": { | ||
18 | "element": {"#": "fillMaterialCB"}, | ||
19 | "labelField": "_name", | ||
20 | "dataField": "_name" | ||
21 | } | ||
22 | }, | ||
14 | "owner": { | 23 | "owner": { |
15 | "module": "js/components/tools-properties/fill-properties.reel", | 24 | "module": "js/components/tools-properties/fill-properties.reel", |
16 | "name": "FillProperties", | 25 | "name": "FillProperties", |
@@ -18,7 +27,7 @@ | |||
18 | "element": {"#": "fillProperties"}, | 27 | "element": {"#": "fillProperties"}, |
19 | "_useWebGL": {"#": "useWebGLCH"}, | 28 | "_useWebGL": {"#": "useWebGLCH"}, |
20 | "_materialsContainer": {"#": "materialsContainer"}, | 29 | "_materialsContainer": {"#": "materialsContainer"}, |
21 | "_fillMaterial": {"#": "fillMaterialCB"} | 30 | "_fillMaterial": {"@": "_fillMaterialCB"} |
22 | } | 31 | } |
23 | } | 32 | } |
24 | } | 33 | } |
diff --git a/js/components/tools-properties/fill-properties.reel/fill-properties.js b/js/components/tools-properties/fill-properties.reel/fill-properties.js index 3b77d72e..61b667d7 100644 --- a/js/components/tools-properties/fill-properties.reel/fill-properties.js +++ b/js/components/tools-properties/fill-properties.reel/fill-properties.js | |||
@@ -14,7 +14,11 @@ exports.FillProperties = Montage.create(ToolProperties, { | |||
14 | 14 | ||
15 | _subPrepare: { | 15 | _subPrepare: { |
16 | value: function() { | 16 | value: function() { |
17 | ShapesController.DisplayMaterials(this._fillMaterial); | 17 | Object.defineBinding(this._fillMaterial, "items", { |
18 | boundObject: this.application.ninja.appModel, | ||
19 | boundObjectPropertyPath: "materials", | ||
20 | oneway: false | ||
21 | }); | ||
18 | 22 | ||
19 | this.handleChange(null); | 23 | this.handleChange(null); |
20 | this._useWebGL.addEventListener("change", this, false); | 24 | this._useWebGL.addEventListener("change", this, false); |