SeaDragon Mouse Clicks

How do I determine the location of a mouse click on an Ajax SeaDragon scene relative to the original image that was used to create the DeepZoom content?

+6
seadragon
source share
1 answer

Here's how to get your stage position in pixels or seadragon coordinates:

obj = new Seadragon.Viewer( targetId ) obj.viewer.tracker.pressHandler = function(tracker, position) { console.log('pressHandler', position.x, position.y); obj.location = new Seadragon.Point( parseInt(position.x), parseInt(position.y) ); var pointPos = obj.view.viewport.pointFromPixel(obj.location); }; 

hope this helps

+5
source share

All Articles