Changeset 186

Show
Ignore:
Timestamp:
03/21/07 00:12:17 (2 years ago)
Author:
migurski
Message:

Visible log ditched (ticket:20)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/as2/lib/com/modestmaps/core/MarkerSet.as

    r177 r186  
    2121    private var markerTiles:Object; 
    2222     
    23     // for use of TileGrid.log() 
     23    // for finding which is visible 
    2424    private var grid:TileGrid; 
    2525 
     
    8282        markerTiles[markerId][tileKey] = true; 
    8383         
    84         //grid.log('Marker '+markerId+' in '+tileKey); 
     84        //trace('Marker '+markerId+' in '+tileKey); 
    8585    } 
    8686 
     
    124124        } 
    125125         
    126         //grid.log('Touched markers: '+ids.toString()); 
     126        //trace('Touched markers: '+ids.toString()); 
    127127        return touched; 
    128128    } 
  • trunk/as2/lib/com/modestmaps/core/Tile.as

    r179 r186  
    150150    public function paint(mapProvider:IMapProvider, tileCoord:Coordinate):Void 
    151151    { 
    152         //grid.log("Painting tile: " + tileCoord.toString()); 
     152        //trace("Painting tile: " + tileCoord.toString()); 
    153153         
    154154        // set up the proper clip to paint here 
  • trunk/as2/lib/com/modestmaps/core/TileGrid.as

    r179 r186  
    6161    // Mask clip to hide outside edges of tiles. 
    6262    private var mask:MovieClip; 
    63      
    64     // For testing purposes. 
    65     public var labelContainer:MovieClip; 
    66     public var label:TextField; 
    67      
     63 
    6864    // Active when the well is being dragged on the stage. 
    6965    private var wellDragTask:DelayedCall; 
     
    8379    public function TileGrid() 
    8480    { 
    85         this.createEmptyMovieClip( "labelContainer", getNextHighestDepth() ); 
    86         labelContainer.createTextField('label', 1, 10, 10, width-20, height-20); 
    87         label = labelContainer["label"]; 
    88         label.selectable = false; 
    89         label.textColor = 0xFF6600; 
    90                  
    9181        buildWell(); 
    9282        buildMask(); 
     
    184174        allocateTiles(); 
    185175         
    186         labelContainer.swapDepths( getNextHighestDepth() );     
    187  
    188176        // let 'em know we're coming 
    189177        markers.indexAtZoom(zoomLevel); 
     
    195183    { 
    196184        var marker:Marker = new Marker(id, coord, location); 
    197         //log('Marker '+id+': '+coord.toString()); 
     185        //trace('Marker '+id+': '+coord.toString()); 
    198186        markers.put(marker); 
    199187 
     
    223211 
    224212        centerWell(false); 
    225          
    226         /* 
    227         // So the log is visible... 
    228         var c:Color = new Color(well); 
    229         var t:Object = c.getTransform(); 
    230         t.ra = 20; 
    231         t.rb = 204; 
    232         t.ga = 20; 
    233         t.gb = 204; 
    234         t.ba = 20; 
    235         t.bb = 204; 
    236         c.setTransform(t); 
    237         */ 
    238213    } 
    239214     
     
    278253        tiles.push(tile); 
    279254         
    280         //log('Created tile: '+tile.toString()); 
     255        //trace('Created tile: '+tile.toString()); 
    281256        return tile; 
    282257    } 
     
    287262    private function destroyTile(tile:Tile):Void 
    288263    { 
    289         //log('Destroying tile: '+tile.toString()); 
     264        //trace('Destroying tile: '+tile.toString()); 
    290265        tiles.splice(tileIndex(tile), 1); 
    291266        tile.cancelDraw(); 
     
    303278        } 
    304279    } 
    305      
    306     public function log(msg:String):Void 
    307     { 
    308         label.text += msg + '\n'; 
    309         label.scroll = label.maxscroll; 
    310     } 
    311      
    312     public function clearLog():Void 
    313     { 
    314         label.text = ''; 
    315     } 
    316      
     280 
    317281   /* 
    318282    * Reposition tiles and schedule a recursive call for the next frame. 
     
    461425        max.y = well._y - max.y; 
    462426         
    463         //log('min/max for drag: '+min+', '+max+' ('+topLeftOutLimit+', '+bottomRightInLimit+')'); 
     427        //trace('min/max for drag: '+min+', '+max+' ('+topLeftOutLimit+', '+bottomRightInLimit+')'); 
    464428         
    465429        // weird negative edge conditions, limit all movement on an axis 
     
    508472                                : bounds.max.y); 
    509473                                 
    510         //log('Drag bounds would be: '+xMin+', '+yMin+', '+xMax+', '+yMax); 
     474        //trace('Drag bounds would be: '+xMin+', '+yMin+', '+xMax+', '+yMax); 
    511475         
    512476        __startingWellPosition = new Point(well._x, well._y); 
    513         //log('Starting well position: '+__startingWellPosition.toString()); 
     477        //trace('Starting well position: '+__startingWellPosition.toString()); 
    514478         
    515479        map.onStartPan(); 
     
    551515            normalizeWell(); 
    552516            allocateTiles(); 
    553             //log('New well scale: '+well._xscale.toString()); 
     517            //trace('New well scale: '+well._xscale.toString()); 
    554518        } 
    555519    } 
     
    751715                active[i]._y = active[0]._y + (active[i].coord.row    - active[0].coord.row)    * TILE_HEIGHT; 
    752716             
    753                 //log(active[i].toString()+' at '+active[i]._x+', '+active[i]._y+' vs. '+active[0].toString()); 
     717                //trace(active[i].toString()+' at '+active[i]._x+', '+active[i]._y+' vs. '+active[0].toString()); 
    754718            } 
    755719 
     
    762726            scaleAdjust = Math.pow(2, zoomAdjust); 
    763727         
    764             //log('This is where we scale the whole well by '+zoomAdjust+' zoom levels: '+(100 / scaleAdjust)+'%'); 
     728            //trace('This is where we scale the whole well by '+zoomAdjust+' zoom levels: '+(100 / scaleAdjust)+'%'); 
    765729 
    766730            for(var i:Number = 0; i < zoomAdjust; i += 1) { 
     
    785749            } 
    786750         
    787             //log('Scaled to '+zoomLevel+', '+well._xscale+'%'); 
     751            //trace('Scaled to '+zoomLevel+', '+well._xscale+'%'); 
    788752            markers.indexAtZoom(zoomLevel); 
    789753        } 
     
    11791143        well.lineTo(width/-2, height/-2); 
    11801144        well.endFill(); 
    1181          
    1182         label.textColor = 0xFF6600; 
    1183         label._width = width - 20; 
    1184         label._height = height - 20; 
    11851145    } 
    11861146} 
  • trunk/as2/lib/com/modestmaps/Map.as

    r184 r186  
    252252         
    253253        /* 
    254         grid.log('top left: '+corners[0].toString()); 
    255         grid.log('top right: '+corners[1].toString()); 
    256         grid.log('bottom left: '+corners[2].toString()); 
    257         grid.log('bottom right: '+corners[3].toString()); 
     254        trace('top left: '+corners[0].toString()); 
     255        trace('top right: '+corners[1].toString()); 
     256        trace('bottom left: '+corners[2].toString()); 
     257        trace('bottom right: '+corners[3].toString()); 
    258258        */ 
    259259 
     
    506506    public function putMarker(id:String, location:Location):Void 
    507507    { 
    508         //grid.log('Marker '+id+': '+location.toString()); 
     508        //trace('Marker '+id+': '+location.toString()); 
    509509        grid.putMarker(id, __mapProvider.locationCoordinate(location), location); 
    510510    } 
     
    531531    public function onMarkerEnters(id:String, location:Location):Void 
    532532    { 
    533         //grid.log('+ '+marker.toString()); 
     533        //trace('+ '+marker.toString()); 
    534534        dispatchEvent( EVENT_MARKER_ENTERS, id, location ); 
    535535    } 
     
    546546    public function onMarkerLeaves(id:String, location:Location):Void 
    547547    { 
    548         //grid.log('- '+marker.toString()); 
     548        //trace('- '+marker.toString()); 
    549549        dispatchEvent( EVENT_MARKER_LEAVES, id, location ); 
    550550    } 
     
    558558    public function onStartZoom():Void 
    559559    { 
    560         //grid.log('Leaving zoom level '+grid.zoomLevel+'...'); 
     560        //trace('Leaving zoom level '+grid.zoomLevel+'...'); 
    561561        dispatchEvent( EVENT_START_ZOOMING, grid.zoomLevel ); 
    562562    } 
     
    570570    public function onStopZoom():Void 
    571571    { 
    572         //grid.log('...Entering zoom level '+grid.zoomLevel); 
     572        //trace('...Entering zoom level '+grid.zoomLevel); 
    573573        dispatchEvent( EVENT_STOP_ZOOMING, grid.zoomLevel ); 
    574574    } 
     
    584584    public function onZoomed(delta:Number):Void 
    585585    { 
    586         //grid.log('Current well offset from start: '+delta.toString()); 
     586        //trace('Current well offset from start: '+delta.toString()); 
    587587        dispatchEvent( EVENT_ZOOMED_BY, delta ); 
    588588    } 
     
    595595    public function onStartPan():Void 
    596596    { 
    597         //grid.log('Starting pan...'); 
     597        //trace('Starting pan...'); 
    598598        dispatchEvent( EVENT_START_PANNING ); 
    599599    } 
     
    606606    public function onStopPan():Void 
    607607    { 
    608         //grid.log('...Stopping pan'); 
     608        //trace('...Stopping pan'); 
    609609        dispatchEvent( EVENT_STOP_PANNING ); 
    610610    } 
     
    620620    public function onPanned(delta:Point):Void 
    621621    { 
    622         //grid.log('Current well offset from start: '+delta.toString()); 
     622        //trace('Current well offset from start: '+delta.toString()); 
    623623        dispatchEvent( EVENT_PANNED_BY, delta ); 
    624624    } 
  • trunk/as2/lib/SampleClient.as

    r177 r186  
    6666        buttons.push(makeButton(__navButtons, 'down', 'pan down', Delegate.create(__map, __map.panDown))); 
    6767        buttons.push(makeButton(__navButtons, 'left', 'pan right', Delegate.create(__map, __map.panRight))); 
    68         buttons.push(makeButton(__navButtons, 'clear', 'clear log', Delegate.create(__map.grid, __map.grid.clearLog))); 
    6968 
    7069                //__navButtons._x = __navButtons._y = 50; 
     
    192191    private static function onMarkerEnters( id : String, location : Location ):Void 
    193192    { 
    194         __map.grid.log('+ '+id+' =)'); 
     193        trace('+ '+id+' =)'); 
    195194    } 
    196195     
    197196    private static function onMarkerLeaves( id : String, location : Location ):Void 
    198197    { 
    199         __map.grid.log('- '+id+' =('); 
     198        trace('- '+id+' =('); 
    200199    } 
    201200}