Skip to content

Commit

Permalink
fix(supercluster): fixes inconsistent rounding causing clusters to no…
Browse files Browse the repository at this point in the history
…t decluster at maxZoom when using fractional zooming
  • Loading branch information
scarg0e committed Jun 21, 2024
1 parent c5cdf54 commit ff91d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/supercluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class SuperClusterAlgorithm extends AbstractAlgorithm {

public calculate(input: AlgorithmInput): AlgorithmOutput {
let changed = false;
const state = { zoom: input.map.getZoom() };
const state = { zoom: Math.round(input.map.getZoom()) };

if (!equal(input.markers, this.markers)) {
changed = true;
Expand Down

0 comments on commit ff91d0f

Please sign in to comment.