Dispatch events when the nodes are added or removed from the dupes list. Doesn't...
[potlatch2.git] / net / systemeD / halcyon / connection / Connection.as
index 04cd4e96b04806f0c15048347bdc64bf7d561613..1aee407c599db8b11eed33b145668801971e8a77 100755 (executable)
@@ -69,6 +69,7 @@ package net.systemeD.halcyon.connection {
         public static var RELATION_RENUMBERED:String = "relation_renumbered";
         public static var TAG_CHANGED:String = "tag_change";
         public static var NODE_MOVED:String = "node_moved";
+        public static var NODE_ALTERED:String = "node_altered";
         public static var WAY_NODE_ADDED:String = "way_node_added";
         public static var WAY_NODE_REMOVED:String = "way_node_removed";
         public static var WAY_REORDERED:String = "way_reordered";
@@ -365,6 +366,9 @@ package net.systemeD.halcyon.connection {
               nodePositions[a] = [];
             }
             nodePositions[a].push(node);
+            for each (var n:Node in nodePositions[a]) {
+              n.dispatchEvent(new Event(Connection.NODE_ALTERED));
+            }
         }
 
         public function removeDupe(node:Node):void {
@@ -377,6 +381,9 @@ package net.systemeD.halcyon.connection {
               }
             }
             nodePositions[a] = dupes;
+            for each (var n:Node in nodePositions[a]) {
+              n.dispatchEvent(new Event(Connection.NODE_ALTERED));
+            }
         }
 
         public function nodesAtPosition(lat:Number, lon:Number):uint {