From a11ef2eed7049835c8bdfa50a2b893632c46eaa0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 4 Apr 2012 11:11:58 -0700 Subject: Squashed commit of Preparing for the montage undo-manager: Architecture changes Reworked the add and remove elements into 1 function which can take 1 or more elements. Removed the _element from the selection array Many other changes related to those 2 changes Undo/Redo shortcuts are now using montage undo/redo manager. Signed-off-by: Valerio Virgillito --- js/tools/TagTool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js/tools/TagTool.js') diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js index e3f49bbe..5512165e 100755 --- a/js/tools/TagTool.js +++ b/js/tools/TagTool.js @@ -90,7 +90,7 @@ exports.TagTool = Montage.create(DrawingTool, { if(selectionManagerModule.selectionManager.isDocument) { this.editSymbol = documentManagerModule.DocumentManager.activeDocument.documentRoot; } else { - this.editSymbol = selectionManagerModule.selectionManager._selectedItems[0]._element; + this.editSymbol = selectionManagerModule.selectionManager._selectedItems[0]; } */ } @@ -104,7 +104,7 @@ exports.TagTool = Montage.create(DrawingTool, { if(selectionManagerModule.selectionManager.isDocument) { this.editSymbol = documentManagerModule.DocumentManager.activeDocument.documentRoot; } else { - this.editSymbol = selectionManagerModule.selectionManager._selectedItems[0]._element; + this.editSymbol = selectionManagerModule.selectionManager._selectedItems[0]; } } @@ -142,7 +142,7 @@ exports.TagTool = Montage.create(DrawingTool, { element = this.makeElement(~~data.width, ~~data.height, data.planeMat, data.midPt, this.makeTag()); // Insert Element - NJevent("elementAdding", element); + this.application.ninja.elementMediator.addElements(element.el, element.data); } else { element = this.makeStaticElement(this.makeTag()); this._insertStatic(this.editSymbol, element.el, element.style); -- cgit v1.2.3