diff options
author | Armen Kesablyan | 2012-05-17 14:01:38 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-05-17 14:01:38 -0700 |
commit | 6c8f3525b839e82cf43df43700a0160ee2c5458f (patch) | |
tree | 3fb801fa54b759c5568d75bb467e02652ce77c3e /js/components/tools-properties/tag-properties.reel/tag-properties.js | |
parent | e8ae5db7ce7023b638375cbc27a3f7b7a2f77b23 (diff) | |
parent | 342c97ac9b727b22a7b0bfefca4d2a168bc3055b (diff) | |
download | ninja-6c8f3525b839e82cf43df43700a0160ee2c5458f.tar.gz |
Merge branch 'refs/heads/dom-architecture' into binding
Conflicts:
css/ninja.css
scss/imports/scss/_toolbar.scss
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/components/tools-properties/tag-properties.reel/tag-properties.js')
-rwxr-xr-x | js/components/tools-properties/tag-properties.reel/tag-properties.js | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.js b/js/components/tools-properties/tag-properties.reel/tag-properties.js index 6519d5b8..52c6f44c 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.js +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js | |||
@@ -8,7 +8,7 @@ var Montage = require("montage/core/core").Montage; | |||
8 | var Component = require("montage/ui/component").Component; | 8 | var Component = require("montage/ui/component").Component; |
9 | var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; | 9 | var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; |
10 | 10 | ||
11 | exports.TagProperties = Montage.create(ToolProperties, { | 11 | var TagProperties = exports.TagProperties = Montage.create(ToolProperties, { |
12 | divElement: { value: null, enumerable: false }, | 12 | divElement: { value: null, enumerable: false }, |
13 | imageElement: { value: null, enumerable: false }, | 13 | imageElement: { value: null, enumerable: false }, |
14 | videoElement: { value: null, enumerable: false }, | 14 | videoElement: { value: null, enumerable: false }, |
@@ -17,6 +17,24 @@ exports.TagProperties = Montage.create(ToolProperties, { | |||
17 | classField: { value: null, enumerable: false }, | 17 | classField: { value: null, enumerable: false }, |
18 | customName: { value: null, enumerable: false }, | 18 | customName: { value: null, enumerable: false }, |
19 | customLabel: { value: null, enumerable: false }, | 19 | customLabel: { value: null, enumerable: false }, |
20 | addedColorChips: { value: false }, | ||
21 | |||
22 | _fill: { | ||
23 | enumerable: false, | ||
24 | value: { colorMode: 'nocolor', color: null, webGlColor: null } | ||
25 | }, | ||
26 | |||
27 | fill: { | ||
28 | enumerable: true, | ||
29 | get: function () { | ||
30 | return this._fill; | ||
31 | }, | ||
32 | set: function (value) { | ||
33 | if (value !== this._fill) { | ||
34 | this._fill = value; | ||
35 | } | ||
36 | } | ||
37 | }, | ||
20 | 38 | ||
21 | _subPrepare: { | 39 | _subPrepare: { |
22 | value: function() { | 40 | value: function() { |
@@ -31,6 +49,33 @@ exports.TagProperties = Montage.create(ToolProperties, { | |||
31 | } | 49 | } |
32 | }, | 50 | }, |
33 | 51 | ||
52 | draw: { | ||
53 | enumerable: false, | ||
54 | value: function () { | ||
55 | Object.getPrototypeOf(TagProperties).draw.call(this); | ||
56 | |||
57 | if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { | ||
58 | this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; | ||
59 | this.application.ninja.colorController.addButton("chip", this._fillColorCtrl); | ||
60 | |||
61 | this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); | ||
62 | |||
63 | this.addedColorChips = true; | ||
64 | } | ||
65 | |||
66 | if (this.addedColorChips) { | ||
67 | this._fillColorCtrl.color(this._fill.colorMode, this._fill.color); | ||
68 | } | ||
69 | } | ||
70 | }, | ||
71 | |||
72 | handleFillColorChange: { | ||
73 | value: function (e) { | ||
74 | this.fill = e._event; | ||
75 | // this.fill.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color); | ||
76 | } | ||
77 | }, | ||
78 | |||
34 | handleClick: { | 79 | handleClick: { |
35 | value: function(event) { | 80 | value: function(event) { |
36 | this.selectedElement = event._event.target.value; | 81 | this.selectedElement = event._event.target.value; |