highlight nodes in mouseover
[potlatch2.git] / net / systemeD / halcyon / Elastic.as
index c7cdfa0c7b0151339432231a728ed431b4ceea0f..bfaa05769221973f60ddc56edddc2669deb46b9b 100755 (executable)
@@ -61,32 +61,13 @@ package net.systemeD.halcyon {
                        // Create stroke object
                        var stroke:Shape = new Shape();
             stroke.graphics.lineStyle(1, 0xff0000, 1, false, "normal", CapsStyle.ROUND, JointStyle.ROUND);
-                       addToLayer(stroke,2);
+                       addToLayer(stroke,3);
                        dashedLine(stroke.graphics, [2,2]);
-                       
-                       var nodes:Sprite = new Sprite();
-            drawNodes(nodes.graphics);
-            addToLayer(nodes, 2);
-
                }
                
                // ------------------------------------------------------------------------------------------
                // 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);