From b89a7ee8b956c96a1dcee995ea840feddc5d4b27 Mon Sep 17 00:00:00 2001 From: Pierre Frisch Date: Thu, 22 Dec 2011 07:25:50 -0800 Subject: First commit of Ninja to ninja-internal Signed-off-by: Valerio Virgillito --- js/components/ui/color-chip.reel/color-chip.js | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 js/components/ui/color-chip.reel/color-chip.js (limited to 'js/components/ui/color-chip.reel/color-chip.js') 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 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + +var Montage = require("montage/core/core").Montage, + Component = require("montage/ui/component").Component; + +var ColorChip = exports.ColorChip = Montage.create(Component, { + + hasIcon: { + value: true + }, + + mode: { + value: "stroke" + }, + + prepareForDraw: { + value: function() { +// this.colorButton.props = {side: 'right', align: 'bottom', wheel: true, palette: true, gradient: true, image: true, offset: 20}; +// this.application.ninja.colorController.addButton('chip', this.colorButton); + + + this.addEventListener("firstDraw", this, false); + } + }, + + draw: { + value: function() { + + if(this.hasIcon) this.application.ninja.colorController.addButton(this.mode + 'Icon', this.icon); + +// this.application.ninja.colorController.addButton(this.mode, this.chipBtn); + this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: 20}; + this.application.ninja.colorController.addButton(this.mode, this.chipBtn); + } + } + +}); -- cgit v1.2.3