In order to make subclasses of Layer which support edge tiles which are of a

size which is not the same size as all the tiles on the layer (as is the case
in Zoomify layers), change Tile.Image to use the size passed in on construction
instead of this.layer.tileSize. All tests still pass, should have no functional
change for all existing layers. patch by pascalou, r=me (Closes #1496)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@9115 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2009-03-22 00:11:45 +00:00
parent fdb267987b
commit 5c26d578ca

View File

@@ -294,13 +294,12 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
OpenLayers.Util.modifyDOMElement(this.frame,
null, this.position, this.size);
var imageSize = this.layer.getImageSize();
if (this.layerAlphaHack) {
OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv,
null, null, imageSize, this.url);
null, null, this.size, this.url);
} else {
OpenLayers.Util.modifyDOMElement(this.imgDiv,
null, null, imageSize) ;
null, null, this.size) ;
this.imgDiv.src = this.url;
}
return true;
@@ -327,12 +326,11 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
initImgDiv: function() {
var offset = this.layer.imageOffset;
var size = this.layer.getImageSize();
if (this.layerAlphaHack) {
this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null,
offset,
size,
this.size,
null,
"relative",
null,
@@ -342,7 +340,7 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
} else {
this.imgDiv = OpenLayers.Util.createImage(null,
offset,
size,
this.size,
null,
"relative",
null,