diff options
Diffstat (limited to 'js/components')
-rw-r--r-- | js/components/colorwheel.reel/compass_app_log.txt | 3 | ||||
-rw-r--r-- | js/components/popup.reel/compass_app_log.txt | 48 | ||||
-rw-r--r-- | js/components/treeview/ninja-leaf.reel/ninja-leaf.js | 1 | ||||
-rw-r--r-- | js/components/ui/color-chip.reel/color-chip.js | 64 |
4 files changed, 56 insertions, 60 deletions
diff --git a/js/components/colorwheel.reel/compass_app_log.txt b/js/components/colorwheel.reel/compass_app_log.txt deleted file mode 100644 index 815feb02..00000000 --- a/js/components/colorwheel.reel/compass_app_log.txt +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | 2011-11-23 01:07:12 create css/colorwheel.css | ||
2 | 2011-11-23 01:07:25 overwrite css/colorwheel.css | ||
3 | 2011-12-20 17:04:05 overwrite css/colorwheel.css | ||
diff --git a/js/components/popup.reel/compass_app_log.txt b/js/components/popup.reel/compass_app_log.txt deleted file mode 100644 index 8a3fb984..00000000 --- a/js/components/popup.reel/compass_app_log.txt +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | 2011-06-28 18:13:06 create css/popup.css | ||
2 | 2011-06-28 18:13:12 identical css/popup.css | ||
3 | 2011-06-28 18:14:08 overwrite css/popup.css | ||
4 | 2011-06-28 18:14:20 overwrite css/popup.css | ||
5 | 2011-06-28 18:14:29 overwrite css/popup.css | ||
6 | 2011-06-28 18:17:23 overwrite css/popup.css | ||
7 | 2011-06-28 18:17:27 overwrite css/popup.css | ||
8 | 2011-06-28 18:17:56 overwrite css/popup.css | ||
9 | 2011-06-28 18:18:09 overwrite css/popup.css | ||
10 | 2011-06-28 18:20:30 overwrite css/popup.css | ||
11 | 2011-06-28 18:22:35 overwrite css/popup.css | ||
12 | 2011-06-28 18:24:12 overwrite css/popup.css | ||
13 | 2011-06-28 18:24:23 overwrite css/popup.css | ||
14 | 2011-06-28 18:24:33 overwrite css/popup.css | ||
15 | 2011-06-28 18:25:17 overwrite css/popup.css | ||
16 | 2011-06-28 18:26:21 overwrite css/popup.css | ||
17 | 2011-06-28 18:26:33 overwrite css/popup.css | ||
18 | 2011-06-28 18:26:42 overwrite css/popup.css | ||
19 | 2011-06-28 18:26:57 overwrite css/popup.css | ||
20 | 2011-06-28 18:29:57 overwrite css/popup.css | ||
21 | 2011-06-28 18:30:14 overwrite css/popup.css | ||
22 | 2011-06-28 18:30:23 overwrite css/popup.css | ||
23 | 2011-06-28 18:30:48 overwrite css/popup.css | ||
24 | 2011-06-28 18:31:03 overwrite css/popup.css | ||
25 | 2011-06-29 10:18:31 overwrite css/popup.css | ||
26 | 2011-06-29 10:18:47 overwrite css/popup.css | ||
27 | 2011-06-29 10:37:19 overwrite css/popup.css | ||
28 | 2011-06-29 10:40:29 overwrite css/popup.css | ||
29 | 2011-06-29 10:45:37 overwrite css/popup.css | ||
30 | 2011-06-29 10:45:53 identical css/popup.css | ||
31 | 2011-06-29 10:46:52 overwrite css/popup.css | ||
32 | 2011-06-29 10:47:02 identical css/popup.css | ||
33 | 2011-06-29 13:30:47 overwrite css/popup.css | ||
34 | 2011-06-29 13:31:14 overwrite css/popup.css | ||
35 | 2011-12-20 17:06:48 overwrite css/popup.css | ||
36 | 2011-12-22 11:29:15 overwrite css/popup.css | ||
37 | 2011-12-22 11:29:24 identical css/popup.css | ||
38 | 2011-12-22 11:30:05 overwrite css/popup.css | ||
39 | 2011-12-22 11:30:33 overwrite css/popup.css | ||
40 | 2011-12-22 11:30:51 overwrite css/popup.css | ||
41 | 2011-12-22 11:32:30 overwrite css/popup.css | ||
42 | 2011-12-22 11:33:06 overwrite css/popup.css | ||
43 | 2011-12-22 11:33:12 overwrite css/popup.css | ||
44 | 2011-12-22 11:33:32 identical css/popup.css | ||
45 | 2011-12-22 11:33:36 overwrite css/popup.css | ||
46 | 2011-12-22 11:34:48 overwrite css/popup.css | ||
47 | 2012-01-26 11:42:18 overwrite css/popup.css | ||
48 | 2012-01-26 11:42:20 overwrite css/popup.css | ||
diff --git a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js index 749df3cd..0b7a171e 100644 --- a/js/components/treeview/ninja-leaf.reel/ninja-leaf.js +++ b/js/components/treeview/ninja-leaf.reel/ninja-leaf.js | |||
@@ -41,7 +41,6 @@ exports.Leaf = Montage.create(TreeNode, { | |||
41 | }, | 41 | }, |
42 | callDelegateMethod : { | 42 | callDelegateMethod : { |
43 | value: function(methodName) { | 43 | value: function(methodName) { |
44 | console.log("Delegate method name: ", methodName); | ||
45 | var delegate = this.treeView.contentController.delegate; | 44 | var delegate = this.treeView.contentController.delegate; |
46 | if(delegate && typeof delegate[methodName] === 'function') { | 45 | if(delegate && typeof delegate[methodName] === 'function') { |
47 | delegate[methodName](this.sourceObject); | 46 | delegate[methodName](this.sourceObject); |
diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js index 5bef7020..e51bdd8a 100644 --- a/js/components/ui/color-chip.reel/color-chip.js +++ b/js/components/ui/color-chip.reel/color-chip.js | |||
@@ -9,32 +9,80 @@ var Montage = require("montage/core/core").Montage, | |||
9 | 9 | ||
10 | var ColorChip = exports.ColorChip = Montage.create(Component, { | 10 | var ColorChip = exports.ColorChip = Montage.create(Component, { |
11 | 11 | ||
12 | chip: { | ||
13 | value: false | ||
14 | }, | ||
15 | |||
12 | hasIcon: { | 16 | hasIcon: { |
13 | value: true | 17 | value: true |
14 | }, | 18 | }, |
15 | 19 | ||
20 | iconType: { | ||
21 | value: null | ||
22 | }, | ||
23 | |||
16 | mode: { | 24 | mode: { |
17 | value: "stroke" | 25 | value: "stroke" |
18 | }, | 26 | }, |
19 | 27 | ||
20 | prepareForDraw: { | 28 | offset: { |
21 | value: function() { | 29 | value: 20 |
22 | // this.colorButton.props = {side: 'right', align: 'bottom', wheel: true, palette: true, gradient: true, image: true, offset: 20}; | 30 | }, |
23 | // this.application.ninja.colorController.addButton('chip', this.colorButton); | ||
24 | 31 | ||
32 | initialColor: { | ||
33 | value: false | ||
34 | }, | ||
25 | 35 | ||
36 | changeDelegate: { | ||
37 | value: null | ||
38 | }, | ||
39 | |||
40 | prepareForDraw: { | ||
41 | value: function() { | ||
26 | this.addEventListener("firstDraw", this, false); | 42 | this.addEventListener("firstDraw", this, false); |
27 | } | 43 | } |
28 | }, | 44 | }, |
29 | 45 | ||
30 | draw: { | 46 | draw: { |
31 | value: function() { | 47 | value: function() { |
48 | if(this.hasIcon) { | ||
49 | var icon = this.iconType || this.mode + "Icon"; | ||
50 | this.application.ninja.colorController.addButton(icon, this.icon); | ||
51 | } | ||
32 | 52 | ||
33 | if(this.hasIcon) this.application.ninja.colorController.addButton(this.mode + 'Icon', this.icon); | 53 | this.chipBtn.props = {side: 'right', align: 'top', wheel: true, palette: true, gradient: true, image: true, offset: this.offset}; |
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); | 54 | this.application.ninja.colorController.addButton(this.mode, this.chipBtn); |
55 | |||
56 | } | ||
57 | }, | ||
58 | |||
59 | handleFirstDraw: { | ||
60 | value: function(evt) { | ||
61 | if(this.chip) { | ||
62 | // This is a single chip - Not related to the color panel -- Set the initial color if found | ||
63 | var mode = "rgb", r = 0, g = 0, b = 0, a = 1, css = "rgb(255,0,0)"; | ||
64 | |||
65 | if(this.initialColor) { | ||
66 | var colorObj = this.application.ninja.colorController.getColorObjFromCss(this.initialColor); | ||
67 | mode = colorObj.mode; | ||
68 | r = colorObj.value.r; | ||
69 | g = colorObj.value.g; | ||
70 | b = colorObj.value.b; | ||
71 | a = colorObj.value.a; | ||
72 | css = colorObj.css; | ||
73 | } | ||
74 | |||
75 | this.chipBtn.color(mode, {wasSetByCode: true, type: 'change', color: {r: r, g: g, b: b}, css: css}); | ||
76 | this.chipBtn.addEventListener("change", this, false); | ||
77 | } | ||
78 | } | ||
79 | }, | ||
80 | |||
81 | handleChange: { | ||
82 | value: function(evt) { | ||
83 | if(this.changeDelegate && typeof(this.changeDelegate === "function")) { | ||
84 | this.changeDelegate(evt); | ||
85 | } | ||
38 | } | 86 | } |
39 | } | 87 | } |
40 | 88 | ||