diff options
author | Pushkar Joshi | 2012-03-02 12:24:33 -0800 |
---|---|---|
committer | Pushkar Joshi | 2012-03-02 12:24:33 -0800 |
commit | 4419209a1fd850ab468209b562b66b0242b42a9c (patch) | |
tree | bd7ca04f963f5a3aeb4b3c06db6f187903307d45 /js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js | |
parent | 1b68bb87c458877cb850a96d8a093d6064bc41dc (diff) | |
parent | ff0a956f33df034e9a009cfcb8999e469456a4b5 (diff) | |
download | ninja-4419209a1fd850ab468209b562b66b0242b42a9c.tar.gz |
Merge branch 'master' into brushtool
Diffstat (limited to 'js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js')
-rwxr-xr-x | js/panels/properties.reel/sections/custom-rows/color-select.reel/color-select.js | 83 |
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> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No 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 | |||
7 | var Montage = require("montage/core/core").Montage; | ||
8 | var Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.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 | ||