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

Uniformizes initial popup size #329

Closed
wants to merge 1 commit into from
Closed

Conversation

gtache
Copy link
Contributor

@gtache gtache commented Dec 22, 2023

Closes #328
Also allows setting default height and width with properties.

…ses the same values for all the annotations
@pcorless
Copy link
Owner

pcorless commented Jan 20, 2024

This approach works OK at the 100% zoom but the popup size will vary as the zoom changes. I would probably recommend a fix where in the inverse of page transform is used.

try { pageInverseTransform = pageInverseTransform.createInverse(); } catch (NoninvertibleTransformException e) { throw new RuntimeException(e); }
The current implementation has a bug in the current page transform is used. With the above change the popup box will always be the same size no matter the zoom level relative to the page size. Please let me know if I misunderstood the intent.

@pcorless
Copy link
Owner

image
Here's an example of the inverse transform in use. The annotations where created at three different zoom levels and you can see the popups are all the same size.

@gtache
Copy link
Contributor Author

gtache commented Jan 29, 2024

Thanks for the fix! I'll check if this is exactly what we want but I'm pretty sure it is, so I'm closing this PR for now.

@gtache gtache closed this Jan 29, 2024
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

Successfully merging this pull request may close these issues.

Uniformize default popup size
2 participants