aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui/color-chip.reel/color-chip.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/ui/color-chip.reel/color-chip.js')
-rw-r--r--js/components/ui/color-chip.reel/color-chip.js41
1 files changed, 41 insertions, 0 deletions
diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js
new file mode 100644
index 00000000..5bef7020
--- /dev/null
+++ b/js/components/ui/color-chip.reel/color-chip.js
@@ -0,0 +1,41 @@
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
7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component;
9
10var ColorChip = exports.ColorChip = Montage.create(Component, {
11
12 hasIcon: {
13 value: true
14 },
15
16 mode: {
17 value: "stroke"
18 },
19
20 prepareForDraw: {
21 value: function() {
22// this.colorButton.props = {side: 'right', align: 'bottom', wheel: true, palette: true, gradient: true, image: true, offset: 20};
23// this.application.ninja.colorController.addButton('chip', this.colorButton);
24
25
26 this.addEventListener("firstDraw", this, false);
27 }
28 },
29
30 draw: {
31 value: function() {
32
33 if(this.hasIcon) this.application.ninja.colorController.addButton(this.mode + 'Icon', this.icon);
34
35// this.application.ninja.colorController.addButton(this.mode, this.chipBtn);
36 this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: 20};
37 this.application.ninja.colorController.addButton(this.mode, this.chipBtn);
38 }
39 }
40
41});