aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-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