informatics-isi-edu / openseadragon-viewer

2D viewer with openseadragon
Apache License 2.0
5 stars 2 forks source link

Fix the text annotation drag bug #108

Closed RFSH closed 9 months ago

RFSH commented 9 months ago

Attaching the events to the div causes the annotation bug. Also there's no reason to add a onmouseleave event as we want users to be able to drag even if the cursor goes beyond the limit.

This PR needs to properly be tested before merging.

RFSH commented 9 months ago

Upon testing I realized that this caused issues with resize logic. So I added a boolean to indicate whether we are in the resize mode or not. And if we are, I'm making sure we're not moving the textbox.

I also made a small change related to cursor. We're now showing the crosshair pointer in draw mode (similar to Google draw).