Merge branch 'master' into history
[potlatch2.git] / net / systemeD / halcyon / connection / Connection.as
index 8714742c4c0a8e3c1d7fbce7157a83886dd4b273..f6f2a7a7aa2f7305668894163e0ef8c87f1093f4 100644 (file)
@@ -90,7 +90,7 @@ package net.systemeD.halcyon.connection {
                public var nodecount:int=0;
                public var waycount:int=0;
                public var relationcount:int=0;
-        private var traces:Array = [];
+        private var traces:Vector.<Trace> = new Vector.<Trace>();
         private var nodePositions:Object = {};
         protected var traces_loaded:Boolean = false;
                private var loadedBboxes:Array = [];
@@ -439,15 +439,22 @@ package net.systemeD.halcyon.connection {
             return changeset;
         }
 
-        protected function addTrace(t:Object):void {
+        public function addTrace(t:Trace):void {
             traces.push(t);
         }
 
         protected function clearTraces():void {
-            traces = [];
+            traces = new Vector.<Trace>();
         }
 
-        public function getTraces():Array {
+               public function findTrace(id:int):Trace {
+                       for each (var t:Trace in traces) {
+                               if (t.id == id) return t;
+                       }
+                       return null;
+               }
+
+        public function getTraces():Vector.<Trace> {
             return traces;
         }