aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js
diff options
context:
space:
mode:
authorKruti Shah2012-05-31 10:44:45 -0700
committerKruti Shah2012-05-31 10:44:45 -0700
commitc350cc1c060fdf17357ddadce024267943784593 (patch)
tree453f86e88f1ee1dfda6fb4b7cc7b17e306e39536 /js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js
parentfdc4f5c7f81ae3b9adeca2232e60268b4be594a2 (diff)
parent121d0e616f48aa7cd048763554089c20a1883d7a (diff)
downloadninja-c350cc1c060fdf17357ddadce024267943784593.tar.gz
Merge branch 'refs/heads/TimelineUberjd' into TimelineUber
Conflicts: js/panels/Timeline/Layer.reel/Layer.js Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
Diffstat (limited to 'js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js')
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js48
1 files changed, 47 insertions, 1 deletions
diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js
index 6d5c46f6..945df857 100755
--- a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js
+++ b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js
@@ -8,7 +8,53 @@ var Montage = require("montage/core/core").Montage,
8 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController, 8 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController,
9 ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; 9 ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
10 10
11exports.InkBottleProperties = Montage.create(ToolProperties, { 11var InkBottleProperties = exports.InkBottleProperties = Montage.create(ToolProperties, {
12 addedColorChips: { value: false },
13
14 _stroke: {
15 enumerable: false,
16 value: { colorMode: 'rgb', color: { r: 255, g: 255, b: 255, a: 1, css: 'rgb(255,255,255)', mode: 'rgb', wasSetByCode: true, type: 'change' }, webGlColor: [1, 1, 1, 1] }
17 },
18
19 stroke: {
20 enumerable: true,
21 get: function () {
22 return this._stroke;
23 },
24 set: function (value) {
25 if (value !== this._stroke) {
26 this._stroke = value;
27 }
28 }
29 },
30
31 draw: {
32 enumerable: false,
33 value: function () {
34 Object.getPrototypeOf(InkBottleProperties).draw.call(this);
35
36 if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) {
37 // setup stroke color
38 this._strokeColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 };
39 this.application.ninja.colorController.addButton("chip", this._strokeColorCtrl);
40
41 this._strokeColorCtrl.addEventListener("change", this.handleStrokeColorChange.bind(this), false);
42
43 this.addedColorChips = true;
44 }
45
46 if (this.addedColorChips) {
47 this._strokeColorCtrl.color(this._stroke.colorMode, this._stroke.color);
48 }
49 }
50 },
51
52 handleStrokeColorChange: {
53 value: function (e) {
54 this.stroke = e._event;
55 this.stroke.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color);
56 }
57 },
12 58
13 _subPrepare: { 59 _subPrepare: {
14 value: function() { 60 value: function() {