aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-06-26 09:18:36 -0700
committerNivesh Rajbhandari2012-06-26 09:18:36 -0700
commit60692e2e429d3265113c89fc53ed80ccd6bbcc2e (patch)
tree8c3799a31b89a84ae17f6e51a5b40ac2034fd27a
parent6a437087e6956904c3b4ff6a09f3cb61d2feb94d (diff)
downloadninja-60692e2e429d3265113c89fc53ed80ccd6bbcc2e.tar.gz
Tag tool pre-flight should support gradients.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
-rwxr-xr-xjs/tools/TagTool.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js
index fac6798f..31918f92 100755
--- a/js/tools/TagTool.js
+++ b/js/tools/TagTool.js
@@ -81,7 +81,7 @@ exports.TagTool = Montage.create(DrawingTool, {
81 // TODO: Add position support 81 // TODO: Add position support
82 insertElement: { 82 insertElement: {
83 value: function(drawData) { 83 value: function(drawData) {
84 var element, styles; 84 var element, styles, color;
85 85
86 // Create the element 86 // Create the element
87 if(this.options.selectedElement === "custom") { 87 if(this.options.selectedElement === "custom") {
@@ -95,8 +95,15 @@ exports.TagTool = Montage.create(DrawingTool, {
95 styles = document.application.njUtils.stylesFromDraw(element, ~~drawData.width, ~~drawData.height, drawData); 95 styles = document.application.njUtils.stylesFromDraw(element, ~~drawData.width, ~~drawData.height, drawData);
96 96
97 // Add color 97 // Add color
98 if(this.options.getProperty("fill.colorMode") !== "nocolor") { 98 color = this.options.fill;
99 styles['background-color'] = this.options.getProperty("fill.color.css"); 99 switch(color.colorMode) {
100 case "nocolor":
101 break;
102 case "gradient":
103 styles['background-image'] = color.color.css;
104 break;
105 default:
106 styles['background-color'] = color.color.css;
100 } 107 }
101 108
102 // Add the element and styles 109 // Add the element and styles