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 +- js/tools/TagTool.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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); } }, diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js index 5e9c792b..5520fa89 100755 --- a/js/tools/TagTool.js +++ b/js/tools/TagTool.js @@ -92,6 +92,11 @@ exports.TagTool = Montage.create(DrawingTool, { // Create the styles styles = document.application.njUtils.stylesFromDraw(element, ~~drawData.width, ~~drawData.height, drawData); + // Add color + if(this.options.getProperty("fill.colorMode") !== "nocolor") { + styles['background-color'] = this.options.getProperty("fill.color.css"); + } + // Add the element and styles this.application.ninja.elementMediator.addElements(element, styles); } -- cgit v1.2.3