OpenLayers OpenLayers

Ticket #1018: drawn.2.patch

File drawn.2.patch, 2.7 kB (added by euzuro, 1 year ago)

update of patch to simply remove the 2nd test case from tile.draw. just draw it all the time. tests pass ie/ff

  • lib/OpenLayers/Tile/Image.js

    old new  
    123123            OpenLayers.Util.modifyDOMElement(this.imgDiv, 
    124124                    null, null, imageSize) ; 
    125125        } 
    126         this.drawn = true; 
    127126        return true; 
    128127    }, 
    129128 
  • lib/OpenLayers/Tile.js

    old new  
    7272     */     
    7373    position: null, 
    7474 
    75     /**  
    76      * Property: drawn  
    77      * {Boolean} false 
    78      */ 
    79     drawn: false, 
    80  
    8175    /** 
    8276     * Property: isLoading 
    8377     * {Boolean} Is the tile loading? 
     
    144138        var withinMaxExtent = (maxExtent && 
    145139                               this.bounds.intersectsBounds(maxExtent, false)); 
    146140  
    147         var mapExtent = this.layer.map.getExtent(); 
    148         var withinMapExtent = (mapExtent && 
    149                                this.bounds.intersectsBounds(mapExtent, false)); 
    150           
    151         // There are two cases where we *wouldn't* want to draw the tile: 
    152         //   
    153         // 1) If the tile is outside its layer's maxExtent 
    154         // 2) When the layer's buffer is 0, if the tile is outside the map's  
    155         //    extent (out of view) 
    156         // 
    157         // ...what we return is the opposite of the above conditions :-) 
    158         // 
    159         return ( (withinMaxExtent || this.layer.displayOutsideMaxExtent) && 
    160                  (withinMapExtent || (this.layer.buffer != 0)) ); 
     141        // The only case where we *wouldn't* want to draw the tile is if the  
     142        // tile is outside its layer's maxExtent. 
     143        return (withinMaxExtent || this.layer.displayOutsideMaxExtent); 
    161144    }, 
    162145     
    163146    /**  
     
    175158            redraw = true; 
    176159        } 
    177160 
    178         this.drawn = false; 
    179161        this.bounds = bounds.clone(); 
    180162        this.position = position.clone(); 
    181163        if (redraw) { 
  • lib/OpenLayers/Layer/Grid.js

    old new  
    548548                break; 
    549549            } 
    550550        }; 
    551         if (this.buffer == 0) { 
    552             for (var r=0, rl=this.grid.length; r<rl; r++) { 
    553                 var row = this.grid[r]; 
    554                 for (var c=0, cl=row.length; c<cl; c++) { 
    555                     var tile = row[c]; 
    556                     if (!tile.drawn &&  
    557                          tile.bounds.intersectsBounds(bounds, false)) { 
    558                         tile.draw(); 
    559                     } 
    560                 } 
    561             } 
    562         } 
    563551    }, 
    564552 
    565553    /**