These are chat archives for openseadragon/openseadragon

Dec 2016
Patrick Liechty
Dec 09 2016 00:38
I want to know if the mouse point is currently inside of the image bounds. The dragHandler gives you relative positions. I want to stop dragging when it hits the image bounds.
Ian Gilman
Dec 09 2016 18:43
@patrickliechty I assume this is some other drag than panning? Let me see...
The event.position from the dragHandler is in web coordinates relative to the viewer element. You can call viewer.viewport.viewerElementToViewportCoordinates(event.position) to get it in viewport coordinates. Then you can call to know the image location in viewport coordinates (assuming you only have a single image)... then you just compare the two