diff options
author | hwc487 | 2012-02-07 14:42:51 -0800 |
---|---|---|
committer | hwc487 | 2012-02-07 14:42:51 -0800 |
commit | 6173fe8440152b1e4c63834a6b4dc7573d532339 (patch) | |
tree | d23449204ae7f23cb9bab09836d126e90c30484b /js/components/tools-properties | |
parent | 2d4da18a778471b02e188ad668752e331ee76127 (diff) | |
parent | aec849d91e4b697d496b9ede28b5d89cf2283781 (diff) | |
download | ninja-6173fe8440152b1e4c63834a6b4dc7573d532339.tar.gz |
Merge branch 'ToolFixes' of github.com:mqg734/ninja-internal into working
Conflicts:
js/helper-classes/RDGE/GLRectangle.js
js/helper-classes/RDGE/GLWorld.js
js/helper-classes/RDGE/MaterialsLibrary.js
Diffstat (limited to 'js/components/tools-properties')
10 files changed, 116 insertions, 55 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); |
diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html index b98a7b4c..1602e793 100644 --- a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html +++ b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html | |||
@@ -36,6 +36,16 @@ | |||
36 | } | 36 | } |
37 | }, | 37 | }, |
38 | 38 | ||
39 | "_strokeMaterialCB": { | ||
40 | "module": "js/components/combobox.reel", | ||
41 | "name": "Combobox", | ||
42 | "properties": { | ||
43 | "element": {"#": "strokeMaterialIBCB"}, | ||
44 | "labelField": "_name", | ||
45 | "dataField": "_name" | ||
46 | } | ||
47 | }, | ||
48 | |||
39 | "owner": { | 49 | "owner": { |
40 | "module": "js/components/tools-properties/ink-bottle-properties.reel", | 50 | "module": "js/components/tools-properties/ink-bottle-properties.reel", |
41 | "name": "InkBottleProperties", | 51 | "name": "InkBottleProperties", |
@@ -49,7 +59,7 @@ | |||
49 | 59 | ||
50 | "_useWebGL": {"#": "useWebGLCHIB"}, | 60 | "_useWebGL": {"#": "useWebGLCHIB"}, |
51 | "_materialsContainer": {"#": "materialsContainerIB"}, | 61 | "_materialsContainer": {"#": "materialsContainerIB"}, |
52 | "_strokeMaterial": {"#": "strokeMaterialIBCB"} | 62 | "_strokeMaterial": {"@": "_strokeMaterialCB"} |
53 | } | 63 | } |
54 | } | 64 | } |
55 | } | 65 | } |
diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js index 61ea808a..e3ffc359 100644 --- a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js +++ b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js | |||
@@ -14,7 +14,11 @@ exports.InkBottleProperties = Montage.create(ToolProperties, { | |||
14 | 14 | ||
15 | _subPrepare: { | 15 | _subPrepare: { |
16 | value: function() { | 16 | value: function() { |
17 | ShapesController.DisplayMaterials(this._strokeMaterial); | 17 | Object.defineBinding(this._strokeMaterial, "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); |
diff --git a/js/components/tools-properties/line-properties.reel/line-properties.js b/js/components/tools-properties/line-properties.reel/line-properties.js index 694e4326..e1ecf790 100644 --- a/js/components/tools-properties/line-properties.reel/line-properties.js +++ b/js/components/tools-properties/line-properties.reel/line-properties.js | |||
@@ -33,18 +33,24 @@ exports.LineProperties = Montage.create(ToolProperties, { | |||
33 | }, | 33 | }, |
34 | 34 | ||
35 | strokeStyle : { | 35 | strokeStyle : { |
36 | get: function() { return this.base._strokeStyle.options[this.base._strokeStyle.value].text; } | 36 | get: function() { |
37 | // return this.base._strokeStyle.options[this.base._strokeStyle.value].text; | ||
38 | return "Solid"; | ||
39 | } | ||
37 | }, | 40 | }, |
38 | 41 | ||
39 | strokeStyleIndex : { | 42 | strokeStyleIndex : { |
40 | get: function() { return this.base._strokeStyle.options[this.base._strokeStyle.value].value; } | 43 | get: function() { |
44 | // return this.base._strokeStyle.options[this.base._strokeStyle.value].value; | ||
45 | return 1; | ||
46 | } | ||
41 | }, | 47 | }, |
42 | 48 | ||
43 | strokeMaterial: { | 49 | strokeMaterial: { |
44 | get: function() { return this.base._strokeMaterial.options[this.base._strokeMaterial.value].value; } | 50 | get: function() { return this.base._strokeMaterial.value; } |
45 | }, | 51 | }, |
46 | 52 | ||
47 | fillMaterial: { | 53 | fillMaterial: { |
48 | get: function() { return this.base._fillMaterial.options[this.base._fillMaterial.value].value; } | 54 | get: function() { return this.base._fillMaterial.value; } |
49 | } | 55 | } |
50 | }); \ No newline at end of file | 56 | }); \ No newline at end of file |
diff --git a/js/components/tools-properties/oval-properties.reel/oval-properties.js b/js/components/tools-properties/oval-properties.reel/oval-properties.js index c88f7799..ddeb64ee 100644 --- a/js/components/tools-properties/oval-properties.reel/oval-properties.js +++ b/js/components/tools-properties/oval-properties.reel/oval-properties.js | |||
@@ -33,19 +33,25 @@ exports.OvalProperties = Montage.create(ToolProperties, { | |||
33 | }, | 33 | }, |
34 | 34 | ||
35 | strokeStyle : { | 35 | strokeStyle : { |
36 | get: function() { return this.base._strokeStyle.options[this.base._strokeStyle.value].text; } | 36 | get: function() { |
37 | // return this.base._strokeStyle.options[this.base._strokeStyle.value].text; | ||
38 | return "Solid"; | ||
39 | } | ||
37 | }, | 40 | }, |
38 | 41 | ||
39 | strokeStyleIndex : { | 42 | strokeStyleIndex : { |
40 | get: function() { return this.base._strokeStyle.options[this.base._strokeStyle.value].value; } | 43 | get: function() { |
44 | // return this.base._strokeStyle.options[this.base._strokeStyle.value].value; | ||
45 | return 1; | ||
46 | } | ||
41 | }, | 47 | }, |
42 | 48 | ||
43 | strokeMaterial: { | 49 | strokeMaterial: { |
44 | get: function() { return this.base._strokeMaterial.options[this.base._strokeMaterial.value].value; } | 50 | get: function() { return this.base._strokeMaterial.value; } |
45 | }, | 51 | }, |
46 | 52 | ||
47 | fillMaterial: { | 53 | fillMaterial: { |
48 | get: function() { return this.base._fillMaterial.options[this.base._fillMaterial.value].value; } | 54 | get: function() { return this.base._fillMaterial.value; } |
49 | } | 55 | } |
50 | 56 | ||
51 | 57 | ||