aboutsummaryrefslogtreecommitdiff
path: root/js/components/ui/color-chip.reel/color-chip.js
diff options
context:
space:
mode:
authorPierre Frisch2011-12-22 07:25:50 -0800
committerValerio Virgillito2012-01-27 11:18:17 -0800
commitb89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch)
tree0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /js/components/ui/color-chip.reel/color-chip.js
parent2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff)
downloadninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
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});