Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the OpenSeadragon.MouseTracker events when using annotorious plugin #2289

Open
vivsamcom opened this issue Feb 6, 2023 · 4 comments
Labels

Comments

@vivsamcom
Copy link

Hi,

I have included Annotorious Toolbar,Annotorious Selector Pack and it works as expected.
I have crop functionality also wherein I am using OpenSeadragon.MouseTracker,OpenSeadragon.Rect to get the croped area.
With the inclusion of the Annotorious plugins now I am not able to select the data using OpenSeadragon functions.
I have tried to use anno.setDrawingEnabled(true); on click of crop button. However it is not working. Am I missing somethging here?

Mine openseadragon version is 2.4.2 and Annotorious version 2.6.0.

Asked the question in annotorious-openseadragon forum as well.
annotorious/annotorious-openseadragon#158

Thanks

@iangilman
Copy link
Member

@msalsbery Any thoughts?

@vivsamcom I don't know enough about that plugin to know what to suggest. It's good you posted there as well; hopefully you'll hear back!

@msalsbery
Copy link
Member

@vivsamcom @iangilman

The OpenSeadragon version is pretty old. There's been a lot of enhancements to make event handling easier for things like annotations but I don't know what OSD version the plugin supports or how the plugin handles events

@vivsamcom
Copy link
Author

@iangilman,

Is there a way I can draw line or free form using the OpenSeadragon functions just like OpenSeadragon.Rect without using any other plugin.

@iangilman
Copy link
Member

@vivsamcom I suppose you could. You'll need to figure out how you want to display that line. OSD does its drawing on canvas, so you can use canvas's drawing commands after each OSD frame, if you want to. As for tracking the user drawing the line, you'll need to use OSD's drag events and also turn off the built-in panning.

Those are a lot of the things the various annotation and overlay plugins do, so you could look at their code for inspiration.

I assume you want to do this because the existing plugins don't do what you want? If I was in that situation, I would probably still use one of overlay plugins, like SVG or canvas, just to make the drawing easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants