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

Add old viewport in ViewportChanged event arguments #2294

Merged
merged 3 commits into from Nov 19, 2023

Conversation

charlenni
Copy link
Member

Until now, the old Viewport wasn't available after changing some of the settings. With this change, the ViewportChanged event has its own EventArgs, which contain the Viewport from before the change. So it is possible to check, what changed in between.

This is regarding #2280.

@pauldendulk
Copy link
Member

Sorry but I have caused conflicts to this PR by merging some big changes.

@charlenni
Copy link
Member Author

Solved them

@pauldendulk pauldendulk linked an issue Nov 19, 2023 that may be closed by this pull request
@pauldendulk pauldendulk modified the milestone: 5.0 Nov 19, 2023
Copy link
Member

@pauldendulk pauldendulk left a comment

Choose a reason for hiding this comment

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

Great.

I guess logical next request will be to have the current viewport state as well. Should we? Lets just take this step first.

@pauldendulk pauldendulk merged commit 9ae2214 into Mapsui:master Nov 19, 2023
5 checks passed
@charlenni
Copy link
Member Author

But why? I don't see any advantage for this.

@pauldendulk
Copy link
Member

You could do a comparison locally with no need to have access to the current viewport, but indeed, there is no real need because there is an alternative solution. So, let's keep it like it is now.

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.

Add previous Viewport state to ViewportChanged event
2 participants