fix for #785 - fix up gutter logic a little bit. on a path to getting all gutter info in one place
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3555 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -381,6 +381,14 @@ OpenLayers.Layer.prototype = {
|
||||
this.setTileSize();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* @returns The size that the image should be, taking into account gutters
|
||||
* @tile OpenLayers.Size
|
||||
*/
|
||||
getImageSize: function() {
|
||||
return (this.imageSize || this.tileSize);
|
||||
},
|
||||
|
||||
/**
|
||||
* APIMethod: setTileSize
|
||||
@@ -405,11 +413,6 @@ OpenLayers.Layer.prototype = {
|
||||
this.imageOffset = new OpenLayers.Pixel(-this.gutter, -this.gutter);
|
||||
this.imageSize = new OpenLayers.Size(tileSize.w + (2 * this.gutter),
|
||||
tileSize.h + (2 * this.gutter));
|
||||
} else {
|
||||
// layers without gutters may have null tile size - as long
|
||||
// as they don't rely on Tile.Image
|
||||
this.imageSize = tileSize;
|
||||
this.imageOffset = new OpenLayers.Pixel(0, 0);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user