highlight nodes in mouseover
[potlatch2.git] / net / systemeD / halcyon / Elastic.as
index b7b3343de723c741e8ba69ac298491f2269f5c6b..bfaa05769221973f60ddc56edddc2669deb46b9b 100755 (executable)
@@ -63,30 +63,11 @@ package net.systemeD.halcyon {
             stroke.graphics.lineStyle(1, 0xff0000, 1, false, "normal", CapsStyle.ROUND, JointStyle.ROUND);
                        addToLayer(stroke,3);
                        dashedLine(stroke.graphics, [2,2]);
-                       
-                       var nodes:Sprite = new Sprite();
-            drawNodes(nodes.graphics);
-            addToLayer(nodes, 3);
-
                }
                
                // ------------------------------------------------------------------------------------------
                // Drawing support functions
 
-               private function drawNodes(g:Graphics):void {
-            g.lineStyle(1, 0xff0000, 1, false, "normal", CapsStyle.ROUND, JointStyle.ROUND);
-                       for (var i:uint = 0; i < 1; i++) {
-                var p:Point = i == 0 ? start : end;
-                var x:Number = map.lon2coord(p.x);
-                var y:Number = map.latp2coord(p.y);
-                g.moveTo(x-2, y-2);
-                g.lineTo(x+2, y-2);
-                g.lineTo(x+2, y+2);
-                g.lineTo(x-2, y+2);
-                g.lineTo(x-2, y-2);
-                       }
-               }
-
                // Draw dashed polyline
                
                private function dashedLine(g:Graphics,dashes:Array):void {
@@ -139,7 +120,7 @@ package net.systemeD.halcyon {
                // Add object (stroke/fill/roadname) to layer sprite
                
                private function addToLayer(s:DisplayObject,t:uint,sublayer:int=-1):void {
-                       var l:DisplayObject=Map(map).getChildAt(5);
+                       var l:DisplayObject=Map(map).getChildAt(map.WAYSPRITE+5);
                        var o:DisplayObject=Sprite(l).getChildAt(t);
                        if (sublayer!=-1) { o=Sprite(o).getChildAt(sublayer); }
                        Sprite(o).addChild(s);