aboutsummaryrefslogtreecommitdiff
path: root/js/tools
diff options
context:
space:
mode:
Diffstat (limited to 'js/tools')
-rwxr-xr-xjs/tools/EyedropperTool.js2
-rwxr-xr-xjs/tools/LineTool.js2
-rwxr-xr-xjs/tools/PenTool.js10
-rwxr-xr-xjs/tools/SelectionTool.js1
-rwxr-xr-xjs/tools/TagTool.js1
5 files changed, 10 insertions, 6 deletions
diff --git a/js/tools/EyedropperTool.js b/js/tools/EyedropperTool.js
index 6a56004d..30a6a48b 100755
--- a/js/tools/EyedropperTool.js
+++ b/js/tools/EyedropperTool.js
@@ -240,7 +240,7 @@ exports.EyedropperTool = Montage.create(toolBase, {
240 else 240 else
241 { 241 {
242 this.application.ninja.colorController.colorModel.alpha = {value: 1, wasSetByCode: true, type: eventType}; 242 this.application.ninja.colorController.colorModel.alpha = {value: 1, wasSetByCode: true, type: eventType};
243 this.application.ninja.colorController.colorModel.applyNoColor(); 243 this.application.ninja.colorController.colorModel.applyNoColor(true);
244 if(updateColorToolBar) 244 if(updateColorToolBar)
245 { 245 {
246 this._previousColor = "none"; 246 this._previousColor = "none";
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 40475908..07429bc0 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -237,7 +237,7 @@ exports.LineTool = Montage.create(ShapeTool, {
237 { 237 {
238 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); 238 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
239 } 239 }
240 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; 240 strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor;
241 } 241 }
242 242
243 var world = this.getGLWorld(canvas, this.options.use3D); 243 var world = this.getGLWorld(canvas, this.options.use3D);
diff --git a/js/tools/PenTool.js b/js/tools/PenTool.js
index 33ca5c71..2cffb44d 100755
--- a/js/tools/PenTool.js
+++ b/js/tools/PenTool.js
@@ -204,10 +204,12 @@ exports.PenTool = Montage.create(ShapeTool, {
204 this.application.ninja.stage.clearDrawingCanvas();//stageManagerModule.stageManager.clearDrawingCanvas(); 204 this.application.ninja.stage.clearDrawingCanvas();//stageManagerModule.stageManager.clearDrawingCanvas();
205 205
206 //undo/redo...go through ElementController and NJEvent 206 //undo/redo...go through ElementController and NJEvent
207 var els = []; 207 if (this._selectedSubpathCanvas) {
208 ElementController.removeElement(this._selectedSubpathCanvas); 208 var els = [];
209 els.push(this._selectedSubpathCanvas); 209 ElementController.removeElement(this._selectedSubpathCanvas);
210 NJevent( "elementsRemoved", els ); 210 els.push(this._selectedSubpathCanvas);
211 NJevent( "elementsRemoved", els );
212 }
211 this._selectedSubpathCanvas = null; 213 this._selectedSubpathCanvas = null;
212 } 214 }
213 }, 215 },
diff --git a/js/tools/SelectionTool.js b/js/tools/SelectionTool.js
index 493f4aa2..8b644d4a 100755
--- a/js/tools/SelectionTool.js
+++ b/js/tools/SelectionTool.js
@@ -228,6 +228,7 @@ var SelectionTool = exports.SelectionTool = Montage.create(ModifierToolBase, {
228 } else { 228 } else {
229 this.application.ninja.currentDocument.model.domContainer = this.application.ninja.currentDocument.model.documentRoot; 229 this.application.ninja.currentDocument.model.domContainer = this.application.ninja.currentDocument.model.documentRoot;
230 } 230 }
231 this.application.ninja.selectionController.executeSelectElement();
231 } 232 }
232 }, 233 },
233 234
diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js
index 508e2a85..fac6798f 100755
--- a/js/tools/TagTool.js
+++ b/js/tools/TagTool.js
@@ -86,6 +86,7 @@ exports.TagTool = Montage.create(DrawingTool, {
86 // Create the element 86 // Create the element
87 if(this.options.selectedElement === "custom") { 87 if(this.options.selectedElement === "custom") {
88 element = document.application.njUtils.make(this.options.customName.value, null, this.application.ninja.currentDocument); 88 element = document.application.njUtils.make(this.options.customName.value, null, this.application.ninja.currentDocument);
89
89 } else { 90 } else {
90 element = document.application.njUtils.make(this.options.selectedElement, null, this.application.ninja.currentDocument); 91 element = document.application.njUtils.make(this.options.selectedElement, null, this.application.ninja.currentDocument);
91 } 92 }