First cut at styling TIGER data via an option. Needs lots of propagation of uid and...
[potlatch2.git] / net / systemeD / halcyon / NodeUI.as
index 350265e6023e6581c668fa1a530f6a1c5f1a2ac6..eb9e608bf8c380f1b97363f47475ec191a4a62fb 100644 (file)
@@ -51,6 +51,7 @@ package net.systemeD.halcyon {
                        var tags:Object = entity.getTagsCopy();
                        tags=applyStateClasses(tags);
                        if (!entity.hasParentWays) { tags[':poi']='yes'; }
+            if (entity.hasInterestingTags()) { tags[':hasTags']='yes'; }
                        if (!styleList || !styleList.isValidAt(paint.map.scale)) {
                                styleList=paint.ruleset.getStyles(entity,tags,paint.map.scale); 
                        }
@@ -132,7 +133,7 @@ package net.systemeD.halcyon {
                        // get colours
                        if (styleList.shapeStyles[sublayer]) {
                                var s:ShapeStyle=styleList.shapeStyles[sublayer];
-                               if (s.color) { icon.graphics.beginFill(s.color); 
+                               if (!isNaN(s.color)) { icon.graphics.beginFill(s.color);
                                        }
                                if (s.casing_width || !isNaN(s.casing_color)) {
                                        icon.graphics.lineStyle(s.casing_width ? s.casing_width : 1,
@@ -146,13 +147,12 @@ package net.systemeD.halcyon {
                }
 
                private function addHitSprite(w:uint):void {
-            var hitzone:Sprite = new Sprite();
+            hitzone = new Sprite();
             hitzone.graphics.lineStyle(4, 0x000000, 1, false, "normal", CapsStyle.ROUND, JointStyle.ROUND);
                        hitzone.graphics.beginFill(0);
                        hitzone.graphics.drawRect(0,0,w,w);
-            addToLayer(hitzone, NODECLICKSPRITE);
-            hitzone.visible = false;
-                       setListenSprite(NODECLICKSPRITE, hitzone);
+                       hitzone.visible = false;
+                       setListenSprite();
                }
 
                private function loadedIcon(event:Event):void {