Skip to content

Zoom fixes #29

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

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Zoom fixes #29

merged 1 commit into from
Jul 2, 2024

Conversation

alejandrocoria
Copy link
Collaborator

No description provided.

extracted zoom range check to isInZoomRange;
fixed comments related to zoom
* The minimum zoom level (0 is lowest) where the polygon should be visible.
* The minimum zoom level (UIState.FULLSCREEN_ZOOM_MIN is lowest) where the overlay should be visible.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Is it okay to mention the constant or should I mention the value directly?

Copy link
Member

Choose a reason for hiding this comment

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

that is fine

Comment on lines -300 to +311
&& activeMapTypes.contains(uiState.mapType)
&& (this.minZoom <= uiState.zoom && this.maxZoom >= uiState.zoom));
&& activeMapTypes.contains(uiState.mapType));
}

/**
* Whether the zoom of the given context is within the zoom range of the overlay.
*
* @param uiState UIState
* @return true if the zoom of uiState is within the zoom range of the overlay
*/
public boolean isInZoomRange(UIState uiState)
{
return (this.minZoom <= uiState.zoom && this.maxZoom >= uiState.zoom);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I separated the zoom check so I could fix a bug later in Journeymap.

Copy link
Member

Choose a reason for hiding this comment

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

nice

@mysticdrew mysticdrew merged commit 11d2a5a into 1.21.x_2.0 Jul 2, 2024
1 check passed
@mysticdrew mysticdrew deleted the 1.21.x_2.0_zoom_fixes branch July 2, 2024 17:42
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