aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js')
-rwxr-xr-xjs/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js83
1 files changed, 83 insertions, 0 deletions
diff --git a/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js b/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js
new file mode 100755
index 00000000..3e81ff67
--- /dev/null
+++ b/js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js
@@ -0,0 +1,83 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9
10exports.ColorSelect = Montage.create(Component, {
11
12 Stroke: {
13 value: null
14 },
15
16 Fill: {
17 value: null
18 },
19
20 strokeChip: {
21 value: null
22 },
23
24 fillChip: {
25 value: null
26 },
27
28 handleChange: {
29 value: function(e) {
30
31 }
32 },
33
34 colorVisible: {
35 value: true
36 },
37
38 color2Visible: {
39 value: true
40 },
41
42 divider: {
43 value: false
44 },
45
46 prepareForDraw: {
47 value: function() {
48 if (this.divider) {
49 this.element.appendChild(document.createElement("hr"));
50 }
51 if (!this.colorVisible) {
52 this.Stroke.style.display = "none";
53 }
54
55 if (!this.color2Visible) {
56 this.Fill.style.display = "none";
57 }
58
59// for (var i = 0; i < this.options.length; i ++ ) {
60// var tmpOption = new Option();
61// tmpOption.text = this.options[i].name;
62// tmpOption.value = this.options[i].value;
63// if (i === this.selectedIndex) tmpOption.selected = true
64// this.options[i].name = this.element.getElementsByTagName("select")[0].add(tmpOption);
65// }
66
67 }
68 },
69
70 destroy: {
71 value: function() {
72 if(this.strokeChip)
73 {
74 this.strokeChip.destroy();
75 }
76 if(this.fillChip)
77 {
78 this.fillChip.destroy();
79 }
80 }
81 }
82
83}); \ No newline at end of file