we should be able to purge now that the event listener problem is fixed
authorRichard Fairhurst <richard@systemed.net>
Fri, 5 Nov 2010 17:48:40 +0000 (17:48 +0000)
committerRichard Fairhurst <richard@systemed.net>
Fri, 5 Nov 2010 17:48:40 +0000 (17:48 +0000)
net/systemeD/halcyon/connection/Connection.as

index 0808a89ea812c5a3ccb9ac26e0ec8fd1d72d5259..e4e2c6c4cb7c2979809360178a765a39196acd51 100755 (executable)
@@ -302,14 +302,17 @@ package net.systemeD.halcyon.connection {
                }
 
                public function purgeOutside(left:Number, right:Number, top:Number, bottom:Number):void {
-                       return;
-                       // ** this doesn't work - WayUIs stick around.
-                       // ** should purge POIs and relations too
                        for each (var way:Way in ways) {
                                if (!way.within(left,right,top,bottom) && !way.isDirty) {
                                        killWayWithNodes(way.id);
                                }
                        }
+                       for each (var poi:Node in pois) {
+                               if (!poi.within(left,right,top,bottom) && !poi.isDirty) {
+                                       killNode(poi.id);
+                               }
+                       }
+                       // ** should purge relations too, if none of their members are on-screen
                }
 
                public function markDirty():void {