From 29ad6355ef60cfb3b3fc7f780504f3ed30845883 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Mon, 7 May 2012 14:30:47 -0700 Subject: More implementation of moving color chips to the individual subtools. Removed the tool color bar Added new icons for inkbottle Removed Pencil tool Removed Inkbottle tool Added chips to the pen, brush and tag tools Aligned controls in several subtools --- .../tag-properties.reel/tag-properties.css | 16 ++++++++ .../tag-properties.reel/tag-properties.html | 10 ++++- .../tag-properties.reel/tag-properties.js | 47 +++++++++++++++++++++- 3 files changed, 70 insertions(+), 3 deletions(-) (limited to 'js/components/tools-properties/tag-properties.reel') diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.css b/js/components/tools-properties/tag-properties.reel/tag-properties.css index 7f1b0f7f..7969dff9 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.css +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.css @@ -4,3 +4,19 @@ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. */ + .tagRadioButtons .fillColorCtrl { + width: 18px; + height: 18px; + margin-top: 6px; + margin-left: 3px; + margin-right: 8px; + border: 1px black solid; +} + + .tagRadioButtons .colorCtrlIcon { + width: 20px; + height: 20px; + margin-top: 6px; + -webkit-transform: scale(0.8); + background-color: rgb(40, 40, 40); +} \ No newline at end of file diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html index c80ba36e..379c37a0 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.html +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html @@ -17,7 +17,9 @@ "properties": { "element": {"#": "tagProperties"}, - "divElement": {"#": "divTool"}, + "_fillColorCtrl": {"#": "fillColorCtrl"}, + + "divElement": {"#": "divTool"}, "imageElement": {"#": "imageTool"}, "videoElement": {"#": "videoTool"}, "canvasElement": {"#": "canvasTool"}, @@ -30,13 +32,17 @@ } } } - +
+
+
+
 
+ 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 1caabc35..32063d9a 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; var Component = require("montage/ui/component").Component; var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; -exports.TagProperties = Montage.create(ToolProperties, { +var TagProperties = exports.TagProperties = Montage.create(ToolProperties, { divElement: { value: null, enumerable: false }, imageElement: { value: null, enumerable: false }, videoElement: { value: null, enumerable: false }, @@ -17,6 +17,24 @@ exports.TagProperties = Montage.create(ToolProperties, { classField: { value: null, enumerable: false }, customName: { value: null, enumerable: false }, customLabel: { value: null, enumerable: false }, + addedColorChips: { value: false }, + + _fill: { + enumerable: false, + value: { colorMode: 'nocolor', color: null, webGlColor: null } + }, + + fill: { + enumerable: true, + get: function () { + return this._fill; + }, + set: function (value) { + if (value !== this._fill) { + this._fill = value; + } + } + }, _subPrepare: { value: function() { @@ -31,6 +49,33 @@ exports.TagProperties = Montage.create(ToolProperties, { } }, + draw: { + enumerable: false, + value: function () { + Object.getPrototypeOf(TagProperties).draw.call(this); + + if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { + this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; + this.application.ninja.colorController.addButton("chip", this._fillColorCtrl); + + this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); + + this.addedColorChips = true; + } + + if (this.addedColorChips) { + this._fillColorCtrl.color(this._fill.colorMode, this._fill.color); + } + } + }, + + handleFillColorChange: { + value: function (e) { + this.fill = e._event; + this.fill.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color); + } + }, + handleClick: { value: function(event) { this.selectedElement = event._event.target.id; -- cgit v1.2.3 From 7dedf0735eec1d227b21291e1bb43dcdec93cbf3 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Tue, 8 May 2012 09:55:02 -0700 Subject: -Removed id dependence of the tag tool options CSS -Separated the options3d CSS from the tag tool options css -Removed unused translateObjectToolContainer CSS class --- .../tools-properties/tag-properties.reel/tag-properties.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/components/tools-properties/tag-properties.reel') diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html index 9dbef6f6..bd4590ce 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.html +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html @@ -38,16 +38,16 @@
-
+
 
- - - - - + + + + +
 
-- cgit v1.2.3 From e973618155eeca6b3608c9d303669e20baeaf0ff Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Tue, 8 May 2012 10:08:30 -0700 Subject: moved all tag tool css back into the scss file added extra padding before first input control --- .../tag-properties.reel/tag-properties.css | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'js/components/tools-properties/tag-properties.reel') diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.css b/js/components/tools-properties/tag-properties.reel/tag-properties.css index 7969dff9..018448f1 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.css +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.css @@ -3,20 +3,3 @@ 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. */ - - .tagRadioButtons .fillColorCtrl { - width: 18px; - height: 18px; - margin-top: 6px; - margin-left: 3px; - margin-right: 8px; - border: 1px black solid; -} - - .tagRadioButtons .colorCtrlIcon { - width: 20px; - height: 20px; - margin-top: 6px; - -webkit-transform: scale(0.8); - background-color: rgb(40, 40, 40); -} \ No newline at end of file -- cgit v1.2.3 From 18370abcf406c6ab36d5c5f2613cb79e756ff6d2 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Wed, 9 May 2012 18:07:32 -0700 Subject: -Consolidated many redundant css classes used in the tool options bars --- .../tag-properties.reel/tag-properties.html | 26 ++++++++-------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'js/components/tools-properties/tag-properties.reel') diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html index bd4590ce..f92665a7 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.html +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html @@ -37,10 +37,10 @@ -
-
-
-
+
+
+
+
 
@@ -51,15 +51,13 @@
 
-
- +
+ +
-
+
-
- - -
+
- -
- -
-- cgit v1.2.3 From 2cdefe05cdc058160093d7ab9d50a4fadd1c45fc Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Mon, 14 May 2012 12:41:47 -0700 Subject: -updated images for tag and zoom tool -made tag and zoom tool radio group button styles consistent and removed duplicate classes --- .../tools-properties/tag-properties.reel/tag-properties.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'js/components/tools-properties/tag-properties.reel') diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html index f92665a7..e9c15d22 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.html +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html @@ -41,13 +41,13 @@
-
 
+
 
- - - - - + + + + +
 
-- cgit v1.2.3 From 52f63541065ce94fab8766b1b0db057eafcfccaa Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Mon, 14 May 2012 14:57:07 -0700 Subject: -changed tool options radio button class to match the styling of the shape options tool buttons -fixed bug injected in the tag tool caused by accidental removal of the value element attribute -moved color chip in the tag tool to the right of the element radio button group --- .../tag-properties.reel/tag-properties.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'js/components/tools-properties/tag-properties.reel') diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html index e9c15d22..7a8f6d87 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.html +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html @@ -39,18 +39,18 @@
+ + + + + + +
 
+
 
- - - - - - -
 
-
-- cgit v1.2.3 From 035c851a955952d0a1c89a7c8a646b674ab3f4f2 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Tue, 15 May 2012 10:42:41 -0700 Subject: -fixed spacing problem in the tag tool -implemented the new mode radio buttons for the pen tool --- js/components/tools-properties/tag-properties.reel/tag-properties.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/tools-properties/tag-properties.reel') diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html index 7a8f6d87..87f87aff 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.html +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html @@ -45,7 +45,7 @@ -
 
+
 
-- cgit v1.2.3 From dcbdd4d4be9a02e792bce445ab360b72d66fa326 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 15 May 2012 15:41:16 -0700 Subject: Add color to tag tool Signed-off-by: Valerio Virgillito --- js/components/tools-properties/tag-properties.reel/tag-properties.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/components/tools-properties/tag-properties.reel') 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 1357ba67..52c6f44c 100755 --- a/js/components/tools-properties/tag-properties.reel/tag-properties.js +++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js @@ -72,7 +72,7 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, { handleFillColorChange: { value: function (e) { this.fill = e._event; - this.fill.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color); +// this.fill.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color); } }, -- cgit v1.2.3