aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties
diff options
context:
space:
mode:
authorAnanya Sen2012-02-08 15:37:23 -0800
committerAnanya Sen2012-02-08 15:37:23 -0800
commitab6f2f7ada39a9b27408575af9a565daf0a9d291 (patch)
tree92a796e34530d1a724ddb24ef22e59ffef13c12a /js/components/tools-properties
parent36b2e540f06cef3887e7d0fea60527fee51e2a40 (diff)
parent5a69d5be181ea98fa842977885ebd8c861dda6ca (diff)
downloadninja-ab6f2f7ada39a9b27408575af9a565daf0a9d291.tar.gz
Merge branch 'FileIO' of github.com:joseeight/ninja-internal into FileIO
Diffstat (limited to 'js/components/tools-properties')
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.html11
-rwxr-xr-xjs/components/tools-properties/fill-properties.reel/fill-properties.js6
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.html12
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js6
-rwxr-xr-xjs/components/tools-properties/line-properties.reel/line-properties.js14
-rwxr-xr-xjs/components/tools-properties/oval-properties.reel/oval-properties.js14
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.js14
-rwxr-xr-xjs/components/tools-properties/shape-properties.reel/shape-properties.css6
-rwxr-xr-xjs/components/tools-properties/shape-properties.reel/shape-properties.html35
-rwxr-xr-xjs/components/tools-properties/shape-properties.reel/shape-properties.js36
-rwxr-xr-xjs/components/tools-properties/tag-properties.reel/tag-properties.html6
11 files changed, 112 insertions, 48 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 100755
--- 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 100755
--- 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 100755
--- 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 100755
--- 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 100755
--- 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 100755
--- 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
diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.js b/js/components/tools-properties/rect-properties.reel/rect-properties.js