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

Allow controlling min select-to-zoom sizes #1384

Merged
merged 1 commit into from
Mar 22, 2023
Merged

Allow controlling min select-to-zoom sizes #1384

merged 1 commit into from
Mar 22, 2023

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Mar 10, 2023

I'm adding a prop called minZoom to both SelectToZoom and AxialSelectToZoom to allow changing the default min zoom size of 20px.

@axelboc axelboc requested a review from loichuder March 10, 2023 13:06
Copy link
Member

@loichuder loichuder left a comment

Choose a reason for hiding this comment

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

I understand the rationale behind the default minimal value when it was not configurable.

But now, I think it would make sense to not set a default value for minZoom and have no check when it is not supplied. It would be up to consumers such as @h5web/app to set this minimal value themselves.

What do you think ?

@axelboc
Copy link
Contributor Author

axelboc commented Mar 21, 2023

While I agree with your sentiment, having "no check when it is not supplied" isn't great as the bug of dragging while clicking is subtle and might not be noticed by developers. minZoom has to be provided somehow, so it can either be mandatory or have a default value of at least a few pixels.

I would personally prefer to keep a sensible default on the low-level components, perhaps less opinionated than 20px, like 5 or 10?

If you prefer, I can make minZoom required on the low-level components, but then I'd still need a default for DefaultInteractions.

@loichuder
Copy link
Member

While I agree with your sentiment, having "no check when it is not supplied" isn't great as the bug of dragging while clicking is subtle and might not be noticed by developers.

Yeah. Agreed. Let's ship it with 20px then.

@axelboc axelboc merged commit 2afb2e2 into main Mar 22, 2023
@axelboc axelboc deleted the mi-select-to-zoom branch March 22, 2023 08:02
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