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

Annotations jump slightly when rasterized #40

Open
TheTechromancer opened this issue Oct 6, 2020 · 3 comments
Open

Annotations jump slightly when rasterized #40

TheTechromancer opened this issue Oct 6, 2020 · 3 comments

Comments

@TheTechromancer
Copy link

First of all, thank you very much for taking the time to make marker.js. It is amazing :)

We are running into this issue when rendering marker.js inside a bootstrap modal. Any help/recommendations would be appreciated.

Peek 2020-10-06 10-03

Thanks!

@ailon
Copy link
Owner

ailon commented Oct 7, 2020

Not sure if this could be helpful but have you tried setting a different targetRoot in the config?

targetRoot - in case your target image is not a child of document.body you can specify a different root here,

@TheTechromancer
Copy link
Author

Thanks, I'll give this a try.

@TheTechromancer
Copy link
Author

TheTechromancer commented Oct 26, 2020

Okay so I finally was able to test this, and I wasn't able to get targetRoot to influence the positioning.

However, the size of the image seems to be a factor. Small images (e.g. 200x100 pixels) are unaffected by the bug and render normally, whereas for larger ones, the div element containing the svg overlay (the one with absolute positioning) is placed slightly too far to the left. It seems like larger images result in larger offsets, but I could be extrapolating.

small-offset

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

No branches or pull requests

2 participants