fix halcyon_viewer redraw post-refactoring
authorRichard Fairhurst <richard@systemed.net>
Tue, 30 Mar 2010 15:52:00 +0000 (15:52 +0000)
committerRichard Fairhurst <richard@systemed.net>
Tue, 30 Mar 2010 15:52:00 +0000 (15:52 +0000)
halcyon_viewer.as
net/systemeD/halcyon/styleparser/RuleSet.as

index 7a8070f..11f8fa8 100755 (executable)
@@ -68,8 +68,7 @@ package {
                }
 
                private function onRefreshCSS(str:String):void {
-                       theMap.ruleset.loadFromCSS(str);
-                       theMap.redraw();
+                       theMap.setStyle(str);
                }               
                private function onJumpTo(lat:Number,lon:Number):void {
                        theMap.init(lat,lon);
index bdc1586..98b7d2b 100644 (file)
@@ -45,7 +45,7 @@ package net.systemeD.halcyon.styleparser {
                // Loading stylesheet
 
                public function loadFromCSS(str:String):void {
-                       if (str.match(/[\s\n\r\t]/)!=null) { parseCSS(str); redrawCallback(); return; }
+                       if (str.match(/[\s\n\r\t]/)!=null) { parseCSS(str); loaded=true; redrawCallback(); return; }
 
                        var request:URLRequest=new URLRequest(str);
                        var loader:URLLoader=new URLLoader();
@@ -62,10 +62,7 @@ package net.systemeD.halcyon.styleparser {
                private function parseCSS(str:String):void {
                        var css:MapCSS=new MapCSS(minscale,maxscale);
                        choosers=css.parse(str);
-//                     Inspector.getInstance().show();
-//                     Inspector.getInstance().shelf('Choosers', choosers);
                        loadImages();
-//                     map.redraw();
                }
 
                private function doRedrawCallback(e:Event):void {