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

fix: added support for max cluster radius functions #23

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Fixed
- maxClusterRadius now accepts also functions as input value

## 0.6.0 - 2024-02-13
### Added
- added [iconCreateFunction](https://github.com/Leaflet/Leaflet.markercluster/?tab=readme-ov-file#customising-the-clustered-markers) prop.
Expand Down
4 changes: 2 additions & 2 deletions src/functions/markerClusterGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const markerClusterGroupProps = {
* current map zoom and returns the maximum cluster radius in pixels.
**/
maxClusterRadius: {
type: Number,
type: [Number, Function],
default: 80
},
/**
Expand Down Expand Up @@ -211,7 +211,7 @@ export const markerClusterGroupProps = {
type: Function,
default: null
}
} as const
}

export const setupMarkerClusterGroup = (
props: ExtractPropTypes<typeof markerClusterGroupProps>,
Expand Down
Loading