ruven / iipmooviewer

IIPMooViewer is an advanced javascript HTML5 image viewer for streaming high resolution scientific images

Home Page:https://iipimage.sourceforge.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error in deepzoom protocol

sbarex opened this issue · comments

There is a error in the implementation of getThumbnailURL inside deepzoom.js protocol.
The thumbLevel var is defined from the value of this.tileSize that is never setted.
I suggest to change the parseMetaData function to set this variable adding this line before the return statement:

this.tileSize = {w: ts, h: ts};

And, inside getThumbnailURL change the definition of thumbLevel with this:

var thumbLevel = Math.log(this.tileSize.w) / Math.LN2 - 1;
commented

OK thanks, I've just uploaded an update based on your suggestion. I simplified slightly as we don't need to keep separate width and height tile sizes for Deepzoom.