Find and fix issues with fill colours being black and use isNaN comparisons
authorAndy Allan <gravitystorm@gmail.com>
Thu, 2 Sep 2010 14:33:03 +0000 (14:33 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Thu, 2 Sep 2010 14:33:03 +0000 (14:33 +0000)
net/systemeD/halcyon/NodeUI.as
net/systemeD/halcyon/WayUI.as
net/systemeD/halcyon/styleparser/ShapeStyle.as
resources/potlatch.css

index 8621f741dc1933c0d393c652a874bf8c38feaf1d..96e980d50c1437d68461e2afbd2891ace5767a19 100644 (file)
@@ -133,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,
index 1f1134e59fc785990d5ca7785c684eb05134af0a..560e0783f0da1246a7e7ee5abed5ff1e9c9ebeee 100755 (executable)
@@ -232,7 +232,7 @@ package net.systemeD.halcyon {
                                        }
 
                                        // Fill
-                                       if ((s.fill_color || s.fill_image) && entity.findParentRelationsOfType('multipolygon','inner').length==0) {
+                                       if ((!isNaN(s.fill_color) || s.fill_image) && entity.findParentRelationsOfType('multipolygon','inner').length==0) {
                                                fill=new Shape(); addToLayer(fill,FILLSPRITE);
                                                fill.graphics.moveTo(x0,y0);
                                                if (s.fill_image) { new WayBitmapFiller(this,fill.graphics,s); }
index fe83ea1e2cd16f36be5016355a5c24ea6319d2bb..72711dd8a0d033df3cc2e93e3dddffe141bb6799 100644 (file)
@@ -30,7 +30,7 @@ package net.systemeD.halcyon.styleparser {
                }
                
                override public function get drawn():Boolean {
-                       return (fill_image || fill_color || width || casing_width);
+                       return (fill_image || !isNaN(fill_color) || width || casing_width);
                }
 
                public function applyStrokeStyle(g:Graphics):void {
index cd9bddf9d20d706c5480616cf36818d38f6f6a33..a5ad62605fcfb149a478a8a91144b42f3543d7b2 100644 (file)
@@ -193,8 +193,8 @@ relation[type=restriction] node { z-index:11; icon-image: icons/restriction.png;
 
 node :hoverway { z-index: 9; icon-image: square; icon-width: 7; color: blue; }
 node !:drawn :poi { z-index: 2; icon-image: circle; icon-width: 4; color: green; casing-color: black; casing-width: 1; }
-node !:drawn :hasTags { z-index: 9; icon-image: circle; icon-width: 3; color: darkslateblue; casing-color: black; casing-width: 1;}
-node :hasTags :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: darkslateblue; }
+node !:drawn :hasTags { z-index: 9; icon-image: circle; icon-width: 4; color: black; }
+node :hasTags :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: black; }
 node !:drawn :selectedway { z-index: 9; icon-image: square; icon-width: 8; color: red; }
 node :selected { z-index: 1; icon-image: square; icon-width: eval('_width+10'); color: yellow; interactive: no; }
 node :junction :selectedway { z-index: 8; icon-image: square; icon-width: 12; casing-color: black; casing-width: 1; }