From 5c26d578ca975c5a16494a5765070349b465c84f Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sun, 22 Mar 2009 00:11:45 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Tile/Image.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index c5f95d5421..4f8b9521c6 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -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,