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

Monkey patch OL to correct position of mouse events in print preview #1440

Conversation

steff-o
Copy link
Contributor

@steff-o steff-o commented Jan 28, 2022

Fixes #1422

Beware: this is a monkey patch that overrides an internal OL function and may very well break when OL is updated.

In order to minimise side effects, the monkey patch is only active when print preview is active.

Not all events are fixed with this PR as they internally in OL uses another way of calculating the position of the event. Pinch zoom and pan are among those interaction that is not fixed.

Copy link
Collaborator

@johnnyblasta johnnyblasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working fine, tested with one of my configs.
LGTM

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.

Wrong place for selected polygon in print preview
4 participants