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 minZoom property to FitBoundsOptions #1562

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

Robbendebiene
Copy link
Contributor

The centerZoomFitBounds is a very powerful method and can be used for a lot of different use cases.

Sometimes one doesn't only want to limit the maxZoom but the minZoom level. For example to ensure, that we won't zoom out past a certain zoom level even if this means that the supplied bounds won't fit entirely within.

Clamping the zoom afterwards doesn't work, because the center calculation depends on it.

@JaffaKetchup
Copy link
Member

Hey @Robbendebiene, thanks for the contribution, it certainly looks like something we'd like to have, and the code looks LGTM I think. I just need to give it a quick test, which I should be able to do in the next few days.

At this time, #1551 is taking priority over all other PRs, as it implements significant breaking changes.
@rorystephenson If this is merged prior to #1551, do you think you could integrate it/resolve conflicts? Alternatively, @Robbendebiene, would you be more comfortable resolving conflicts on your side after #1551 is merged (not 100% sure of an ETA for that yet, but should be within the next week or two)?
Don't mind either way, whatever you guys feel more comfortable is fine by me.

@Robbendebiene
Copy link
Contributor Author

Hi @JaffaKetchup, I think integrating this one way or the other should be rather trivial. So I don't mind resolving conflicts after #1551 has landed.

@JaffaKetchup
Copy link
Member

Ok, I'll set this as draft for now then, waiting for #1551 to be merged.

@JaffaKetchup JaffaKetchup marked this pull request as draft June 21, 2023 07:56
@JaffaKetchup JaffaKetchup changed the title Add minZoom property to FitBoundsOptions Add minZoom property to FitBoundsOptions Jun 21, 2023
@Robbendebiene Robbendebiene mentioned this pull request Jun 23, 2023
5 tasks
@JaffaKetchup JaffaKetchup marked this pull request as ready for review July 6, 2023 09:16
@JaffaKetchup
Copy link
Member

Hey @Robbendebiene, if you're around, can you resolve the conflicts please? #1551 has been merged.

@Robbendebiene
Copy link
Contributor Author

Sorry, I accidentally closed this PR. I'm working on the updates.

Use 0 as default value since negative zoom values are very unusual
@Robbendebiene Robbendebiene reopened this Jul 6, 2023
@Robbendebiene
Copy link
Contributor Author

@JaffaKetchup So this is tested and ready for review from my end :)

@JaffaKetchup JaffaKetchup self-requested a review July 7, 2023 06:23
Copy link
Member

@JaffaKetchup JaffaKetchup left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for your contribution!

@JaffaKetchup JaffaKetchup merged commit a48588b into fleaflet:master Jul 7, 2023
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.

2 participants