Closed buraktabn closed 2 years ago
Hello @buraktabn. I had the same problematic as you on a project. I implemented it with a variable that reference the active cluster by his id. I think the library goal is not to have a "selected" handling because how the selection works could really change depending on usage. Just an example I have in mind : How does it works when you move the map ? On one of my projects, I wanted the cluster to be unselected, in another one I wanted the opposite.
I can change the single Cluster easily by adding
isSelected
field intoPlace
. When it comes to multiple Cluster, I found a workaround for now.In my opinion,
Cluster<T>
should have a field calledisSelected
andClusterManager<T extends ClusterItem>
should have a function that updates the cluster by Cluster id. This way it would be easier to update Cluster. Does it make sense? If not, what would be the best practice here?