Working 'replace node' functionality.
[potlatch2.git] / net / systemeD / halcyon / connection / Node.as
index f3bc8d9971c70ea6939621e8d58a2d305cf4cfef..eaf5db1febeb151439a2074bc67a6b50011c8d77 100644 (file)
@@ -107,6 +107,11 @@ package net.systemeD.halcyon.connection {
         public function replaceWith(target:Node, performAction:Function):void {
             performAction(new ReplaceNodeAction(this, target));
         }
         public function replaceWith(target:Node, performAction:Function):void {
             performAction(new ReplaceNodeAction(this, target));
         }
+        public function replaceWithNew(connection:Connection, lat:Number, lon:Number, tags:Object, performAction:Function):Node {
+                       var action:ReplaceNodeWithNewAction = new ReplaceNodeWithNewAction(this, connection, lat, lon, tags);
+                       performAction(action);
+                       return action.replacement;
+        }
 
         public function isDupe():Boolean {
             if (connection.getNode(this.id) == this // node could be part of a vector layer
 
         public function isDupe():Boolean {
             if (connection.getNode(this.id) == this // node could be part of a vector layer