These are chat archives for openseadragon/openseadragon

24th
Jul 2016
William Lee
@WilliamCarlos
Jul 24 2016 21:04
I'm trying to add google-map-esqe tagpoints to an image onclick and am having a bit of trouble with the pixel offset to account for drawing from the top left of the image. The tagpoint I'm using is 25x25 pixel, so what I'm doing right now is creating a new OpenSeadragon point (-12.5, -25) and adding it to the web browser point (event.position) and then converting that new point into a viewport point and adding the overlay there
And it draws correctly on click but moves around when you zoom
actually I see why that doesn't work now..
William Lee
@WilliamCarlos
Jul 24 2016 21:11
should be converting stored tagpoinet viewportPoint -> webPoint -> add (-12.5, -25) webPoint offset -> back to viewportPoint -> draw that viewportPoint
I guess I could stick all of that inside a zoom event listener and I believe that would work
okay I'm gonna go ahead and try to implement that, but please feel free to let me know if someone sees a better way to do this ;)
William Lee
@WilliamCarlos
Jul 24 2016 21:35
It works! But the tagpoints are kind of "jittery" on zoom, I'm guessing because they're not redrawn exactly when the new tiles are redrawn.
William Lee
@WilliamCarlos
Jul 24 2016 22:55
"jittery"-ness fixed by changing the zoom event listener to animation event listener