[x] I'm sure this is a Leaflet.MarkerCluster code issue, not an issue with my own code nor with the framework I'm using (Cordova, Ionic, Angular, React…)
[x] I've searched through the issues to make sure it's not yet reported
How to reproduce
I've been having some trouble lately trying to implement a className change when clicking a specific cluster (all I wanna do is to change the color of the cluster once is clicked). The reason why this happens is because the class itself does not persist, it changes on every cluster render. I tried to change the className manually by using the "clusterclick" event (did not work), and using the iconCreateFunction too (did not work either) because there is no way to see if that cluster was clicked or not. For some reason, zooming in or zooming out changes the leaflet_id too, so idk what to dooo :,(
Leaflet version I'm using: ^1.8.0
Leaflet.MarkerCluster version I'm using: ^1.5.3
Browser (with version) I'm using: Google Chrome, using react too
OS/Platform (with version) I'm using:
the change class idea
What behaviour I'm expecting and which behaviour I'm seeing
the cluster to change color once is clicked
Minimal example reproducing the issue
[x] this example is as simple as possible
[x] this example does not rely on any third party code
How to reproduce
I've been having some trouble lately trying to implement a className change when clicking a specific cluster (all I wanna do is to change the color of the cluster once is clicked). The reason why this happens is because the class itself does not persist, it changes on every cluster render. I tried to change the className manually by using the "clusterclick" event (did not work), and using the iconCreateFunction too (did not work either) because there is no way to see if that cluster was clicked or not. For some reason, zooming in or zooming out changes the leaflet_id too, so idk what to dooo :,(
the change class idea
What behaviour I'm expecting and which behaviour I'm seeing
the cluster to change color once is clicked
Minimal example reproducing the issue
Using http://leafletjs.com/edit.html or any other jsfiddle-like site.