aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Color/colorpanel.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Color/colorpanel.js')
-rw-r--r--js/panels/Color/colorpanel.js60
1 files changed, 60 insertions, 0 deletions
diff --git a/js/panels/Color/colorpanel.js b/js/panels/Color/colorpanel.js
new file mode 100644
index 00000000..4858be68
--- /dev/null
+++ b/js/panels/Color/colorpanel.js
@@ -0,0 +1,60 @@
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
7////////////////////////////////////////////////////////////////////////
8//
9var Montage = require("montage/core/core").Montage,
10 PanelBase = require("js/panels/panelbase").PanelBase;
11////////////////////////////////////////////////////////////////////////
12//Exporting as ColorPanel
13exports.ColorPanel = Montage.create(PanelBase, {
14 ////////////////////////////////////////////////////////////////////
15 //Panel Configuration
16 panelName: {value: "Color", writable: true, enumerable: true, configurable: true},
17 panelHeaderID: {value: "colorPanelHeader", writable: true, enumerable: true, configurable: true},
18 disclosureIconID: {value: "colorPanelDisclosureIcon", writable: true, enumerable: true, configurable: true},
19 closeButtonID: {value: "colorPanelCloseButton", writable: true, enumerable: true, configurable: true},
20 panelContentID: {value: "colorPanelContent", writable: true, enumerable: true, configurable: true},
21 ////////////////////////////////////////////////////////////////////
22 //Creating panel from base view class
23 init: {
24 enumerable: true,
25 value: function() {
26 //Initializing Wrapper
27 this.minHeight = 200;
28 this.maxHeight = 200;
29 this.contentHeight = 200;
30 this.isStatic = true;
31 this.scrollable = false;
32 //Getting view from base in controller
33 this.content = this.application.ninja.colorController.colorView = this.application.ninja.colorController.colorPanelBase.create();
34 //Checking for first draw to apply default colors
35 this.content.addEventListener('firstDraw', this, false);
36
37
38 ////////////////////////////////////////////////////////////
39 ////////////////////////////////////////////////////////////
40 //TODO: Remove and add via toolbar draw loop
41 this.application.ninja.colorController.createToolbar();
42 ////////////////////////////////////////////////////////////
43 ////////////////////////////////////////////////////////////
44
45
46 }
47 },
48 ////////////////////////////////////////////////////////////////////
49 //Applying default colors only on first draw
50 handleFirstDraw: {
51 enumerable: true,
52 value: function (e) {
53 //
54 this.content.applyDefaultColors();
55 this.content.removeEventListener('firstDraw', this, false);
56 }
57 }
58 ////////////////////////////////////////////////////////////////////
59 ////////////////////////////////////////////////////////////////////
60}); \ No newline at end of file