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 draw annotations on svg overlay #35

Open
PpyMohan opened this issue Aug 7, 2019 · 6 comments
Open

How to draw annotations on svg overlay #35

PpyMohan opened this issue Aug 7, 2019 · 6 comments
Labels

Comments

@PpyMohan
Copy link

PpyMohan commented Aug 7, 2019

i don't how to draw annotations in svgoverlay on openseadragon

@iangilman
Copy link
Member

You should be able to draw it like any other SVG. What do you want your annotation to look like? Presumably a <rect> with a <text> inside of it?

@PpyMohan
Copy link
Author

PpyMohan commented Aug 7, 2019 via email

@iangilman
Copy link
Member

This plugin uses viewport coordinates.

@PpyMohan
Copy link
Author

PpyMohan commented Aug 7, 2019 via email

@PpyMohan
Copy link
Author

PpyMohan commented Aug 8, 2019 via email

@iangilman
Copy link
Member

Okay how to convert event points to viewport coordinates

I believe event points are in web coordinates, so it would be:

var viewportPoint = viewer.viewport.viewerElementToViewportCoordinates(eventPoint);

Is that possible to keep svgoverlay inside fabricoverlay

I believe Fabric uses Canvas, which isn't the same as SVG. You wouldn't put one inside the other. It should be fine to run them both on top of each other in the same viewer, though, as far as I know.

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

2 participants