aboutsummaryrefslogtreecommitdiff
path: root/js/tools/InkBottleTool.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-06 00:27:59 -0700
committerValerio Virgillito2012-06-06 00:27:59 -0700
commit91123fef348ec54d89005adbc151e816856a6a18 (patch)
treeac20e473f2ef52ef1f7deb18eab4d38d6a35ec4b /js/tools/InkBottleTool.js
parent0e1a276f19ea70009c5a649e9667861d7c346a7e (diff)
parent18e212dca48066d1ddaca96875a3f40adcc859b6 (diff)
downloadninja-91123fef348ec54d89005adbc151e816856a6a18.tar.gz
Merge branch 'refs/heads/master' into montage-v10-integration
Conflicts: js/components/tools-properties/fill-properties.reel/fill-properties.js Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/tools/InkBottleTool.js')
-rwxr-xr-xjs/tools/InkBottleTool.js49
1 files changed, 28 insertions, 21 deletions
diff --git a/js/tools/InkBottleTool.js b/js/tools/InkBottleTool.js
index 2c03d133..dff0b0fa 100755
--- a/js/tools/InkBottleTool.js
+++ b/js/tools/InkBottleTool.js
@@ -69,39 +69,46 @@ exports.InkBottleTool = Montage.create(ModifierToolBase, {
69 69
70 if(this._canColor && this.application.ninja.selectedElements.length) 70 if(this._canColor && this.application.ninja.selectedElements.length)
71 { 71 {
72 var color = this.options.stroke, 72 var strokeInfo = {},
73 colorInfo; 73 color;
74 if(color && color.color) 74 if(this.options.useStrokeColor.checked) {
75 { 75 strokeInfo.colorInfo = {};
76 colorInfo = { mode:color.colorMode, 76 color = this.options.stroke;
77 color:color.color 77 if(color && color.color)
78 }; 78 {
79 } 79 strokeInfo.colorInfo.mode = color.colorMode;
80 else 80 strokeInfo.colorInfo.color = color.color;
81 { 81 } else {
82 colorInfo = { mode:"nocolor", 82 strokeInfo.colorInfo.mode = "nocolor";
83 color:color.color 83 strokeInfo.colorInfo.color = null;
84 }; 84 }
85 } 85 }
86 86
87 if(this.options.useBorderWidth.checked || this.options.useBorderStyle.checked) { 87 if(this.options.useBorderWidth.checked || this.options.useBorderStyle.checked) {
88 colorInfo.borderInfo = {}; 88 strokeInfo.borderInfo = {};
89 if(this.options.useBorderWidth.checked) { 89 if(this.options.useBorderWidth.checked) {
90 colorInfo.borderInfo.borderWidth = this.options._borderWidth.value; 90 strokeInfo.borderInfo.borderWidth = this.options.borderWidth.value;
91 colorInfo.borderInfo.borderUnits = this.options._borderWidth.units; 91 strokeInfo.borderInfo.borderUnits = this.options.borderWidth.units;
92 } 92 }
93 if(this.options.useBorderStyle.checked) { 93 if(this.options.useBorderStyle.checked) {
94 colorInfo.borderInfo.borderStyle = this.options._borderStyle.value; 94 strokeInfo.borderInfo.borderStyle = this.options.borderStyle.value;
95 } 95 }
96 } 96 }
97 97
98 if(this.options.useStrokeSize.checked) { 98 if(this.options.useStrokeSize.checked) {
99 colorInfo.strokeInfo = {}; 99 strokeInfo.shapeInfo = {};
100 colorInfo.strokeInfo.strokeSize = this.options._strokeSize.value; 100 strokeInfo.shapeInfo.strokeSize = this.options.strokeSize.value;
101 colorInfo.strokeInfo.strokeUnits = this.options._strokeSize.units; 101 strokeInfo.shapeInfo.strokeUnits = this.options.strokeSize.units;
102 }
103
104 if(this.options.useWebGL.checked) {
105 strokeInfo.webGLInfo = {};
106 strokeInfo.webGLInfo.material = this.options.strokeMaterial.value;
102 } 107 }
103 108
104 ElementsMediator.setColor(this.application.ninja.selectedElements, colorInfo, false, "Change", "inkBottleTool"); 109 if(strokeInfo.colorInfo || strokeInfo.borderInfo || strokeInfo.shapeInfo || strokeInfo.webGLInfo) {
110 ElementsMediator.setStroke(this.application.ninja.selectedElements, strokeInfo, "Change", "inkBottleTool");
111 }
105 } 112 }
106 } 113 }
107 } 114 }