fix text offset for POIs, and casing for node shapes
authorRichard Fairhurst <richard@systemed.net>
Mon, 30 Nov 2009 01:14:56 +0000 (01:14 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 30 Nov 2009 01:14:56 +0000 (01:14 +0000)
net/systemeD/halcyon/NodeUI.as
net/systemeD/halcyon/styleparser/TextStyle.as

index 365691467730d55330446ecd03fc8a17d4a09000..479ff6e43ffe92b7d23550820a02e111c8902c7e 100644 (file)
@@ -116,12 +116,10 @@ package net.systemeD.halcyon {
                        if (sl.shapeStyles[sublayer]) {
                                var s:ShapeStyle=sl.shapeStyles[sublayer];
                                if (s.color) { icon.graphics.beginFill(s.color); }
-                               if (s.casing_width || s.casing_color!=false) {
+                               if (s.casing_width || !isNaN(s.casing_color)) {
                                        icon.graphics.lineStyle(s.casing_width ? s.casing_width : 1,
                                                                                        s.casing_color ? s.casing_color : 0,
                                                                                        s.casing_opacity ? s.casing_opacity : 1);
-                                       // ** this appears to give casing to things that shouldn't have it
-                                       // Globals.vars.root.addDebug("casing: "+(s.casing_width ? s.casing_width : 1)+","+(s.casing_color ? s.casing_color : 0)+","+(s.casing_opacity ? s.casing_opacity : 1)); 
                                }
                        }
 
@@ -155,8 +153,6 @@ package net.systemeD.halcyon {
                private function updatePosition():void {
                        if (!loaded) { return; }
 
-                       // ** this won't work with text objects. They have a different .x and .y
-                       //    and (obviously) don't need to be rotated. Needs fixing
                        for (var i:uint=0; i<sprites.length; i++) {
                                var d:DisplayObject=sprites[i];
                                d.x=0; d.y=0; d.rotation=0;
index e353e26804745e7d2626f393c657f12daa20931b..9226c8cba7e13ca25579452923248dc57127de55 100644 (file)
@@ -70,9 +70,10 @@ package net.systemeD.halcyon.styleparser {
                                tf.height = tf.textHeight+4;
                        }
                        if (text_halo_radius>0) { tf.filters=getHaloFilter(); }
-                       d.x=x-tf.width/2;
-                       d.y=y+(text_offset ? text_offset : 0);
+                       d.x=x;
+                       d.y=y; tf.y=(text_offset ? text_offset : 0);
                        d.addChild(tf);
+
                        return tf;
                }