Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add option to disable cluster animation #832

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
JeroenDeDauw merged 2 commits into ProfessionalWiki:master from prudloff-insite:animate
Dec 13, 2025

Conversation

@prudloff-insite
Copy link
Contributor

@prudloff-insite prudloff-insite commented Dec 11, 2025
edited by coderabbitai bot
Loading

We have some visual bugs caused by the animation in Leaflet.markercluster.
This patch adds a new clusteranimate option that allows disabling cluster animation.

Summary by CodeRabbit

  • New Features

    • Added a cluster animation option for map marker groups; enabled by default to provide smooth transitions when zooming and spiderfying.
  • Documentation / Localization

    • Added a UI label/translation for the new cluster animation option so it appears in supported locales.

✏️ Tip: You can customize this high-level summary in your review settings.

JeroenDeDauw reacted with thumbs up emoji
Copy link

coderabbitai bot commented Dec 11, 2025
edited
Loading

📝 Walkthrough

Walkthrough

Adds a boolean "clusteranimate" configuration parameter (default true) to the Leaflet service, exposes a translation key, and forwards that parameter to the MarkerClusterGroup initialization as the animate option in the Leaflet client code.

Changes

Cohort / File(s) Summary
Cluster animation wiring
resources/leaflet/LeafletCluster.js, src/LeafletService.php
Adds a clusteranimate boolean parameter (default: true) in the PHP Leaflet service and passes it to MarkerClusterGroup initialization as the animate option in JS (options.clusteranimateanimate).
Translations
i18n/en.json
Adds maps-par-clusteranimate key with descriptive text about enabling smooth transitions for zooming and spiderfying.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check src/LeafletService.php for the default value and that the message key is maps-par-clusteranimate.
  • Confirm resources/leaflet/LeafletCluster.js reads options.clusteranimate and passes a boolean to MarkerClusterGroup.
  • Verify i18n/en.json contains maps-par-clusteranimate and matches the PHP message key.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding an option to control cluster animation behavior, which is the core purpose of this PR.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4cfa6c8 and 1aa2976.

📒 Files selected for processing (3)
  • i18n/en.json (1 hunks)
  • resources/leaflet/LeafletCluster.js (1 hunks)
  • src/LeafletService.php (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • i18n/en.json
🔇 Additional comments (2)
src/LeafletService.php (1)

115-119: LGTM! Parameter definition follows conventions.

The clusteranimate parameter definition is consistent with other cluster parameters in this file. The default value of true maintains backward compatibility by keeping animations enabled by default, which is the expected behavior.

resources/leaflet/LeafletCluster.js (1)

13-13: The animate option is valid for Leaflet.markercluster.

The implementation correctly passes the clusteranimate parameter as the animate option to MarkerClusterGroup. This is a supported configuration option that controls cluster split/merge/spiderfy animations (default: true). No changes needed.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6a7df0f and 600252d.

📒 Files selected for processing (2)
  • resources/leaflet/LeafletCluster.js (1 hunks)
  • src/LeafletService.php (1 hunks)
🔇 Additional comments (1)
resources/leaflet/LeafletCluster.js (1)

13-13: The animate option is supported and correctly implemented.

The animate option is a valid configuration parameter for MarkerClusterGroup that accepts boolean values to control whether cluster split/merge and spiderfy animations run. Your implementation correctly passes options.clusteranimate through to the library, enabling users to disable animations when needed.

@JeroenDeDauw JeroenDeDauw merged commit 9feb26e into ProfessionalWiki:master Dec 13, 2025
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /