aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/tools-properties')
-rw-r--r--js/components/tools-properties/fill-properties.reel/fill-properties.html11
-rw-r--r--js/components/tools-properties/fill-properties.reel/fill-properties.js6
-rw-r--r--js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html12
-rw-r--r--js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js6
-rw-r--r--js/components/tools-properties/line-properties.reel/line-properties.js14
-rw-r--r--js/components/tools-properties/oval-properties.reel/oval-properties.js14
-rw-r--r--js/components/tools-properties/pen-properties.reel/pen-properties.html22
-rw-r--r--js/components/tools-properties/pen-properties.reel/pen-properties.js18
-rw-r--r--js/components/tools-properties/rect-properties.reel/rect-properties.js14
-rw-r--r--js/components/tools-properties/shape-properties.reel/shape-properties.css6
-rw-r--r--js/components/tools-properties/shape-properties.reel/shape-properties.html35
-rw-r--r--js/components/tools-properties/shape-properties.reel/shape-properties.js36
-rw-r--r--js/components/tools-properties/tag-properties.reel/tag-properties.html6
13 files changed, 133 insertions, 67 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 }