Skip to content

Commit

Permalink
Merge pull request #23 from veitbjarsch/fix/max-clutser-radius-types
Browse files Browse the repository at this point in the history
fix: added support for max cluster radius functions
  • Loading branch information
veitbjarsch authored Mar 27, 2024
2 parents 5091343 + 419d6d7 commit c79b71f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit c79b71f

Please sign in to comment.