[OpenLayers-Trac] Re: [OpenLayers] #2964: Error in Layer.Zoomify
when width or height is evenly divisible by 256
OpenLayers
trac-20090302 at openlayers.org
Mon Feb 20 14:05:38 EST 2012
#2964: Error in Layer.Zoomify when width or height is evenly divisible by 256
---------------------+------------------------------------------------------
Reporter: alpage | Owner: euzuro
Type: bug | Status: new
Priority: major | Milestone: 2.12 Release
Component: Layer | Version: 2.11
Keywords: zoomify | State: Review
---------------------+------------------------------------------------------
Comment(by rboulton):
This pull request seems incorrect for an input height of 0; it will
produce a value of this.standardTileSize, whereas if the tile is actually
of 0 height it seems better to return a height of 0. Similarly for the
width.
I'm not sure if this is significant, but I remember being concerned about
it 10 months ago when I put my patch together. I think I saw some issue
when the tiles failed to get rendered by the server which was less
disasterous with a return value of 0 here.
If you want an explicit test for readability, I'd suggest doing an
explicit if; I don't find your version more readable than mine, really.
Or, you could do:
h = (this.tierImageSize[z].h % this.standardTileSize) ||
(this.tierImageSize[z].h && this.standardTileSize)
if you want a one liner. Worse than my version I think, though.
--
Ticket URL: <http://trac.openlayers.org/ticket/2964#comment:6>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list