These methods along with setSelection([]) behave incorrectly when the user has clicked a cluster. These methods check for (this.selection && this.selection.index !== undefined) but if the most recent click was on a cluster, selection looks like {cluster: 0} which doesn't pass that condition.
This leads isSelected(clusterIndex) to return false and setSelection([]) and unselectItem([]) to be a no-op and the next time the user calls getSelection() it will return the cluster again. The current workaround is to set timeline.selection.index to a value, but that definitely isn't intuitive.
These methods along with
setSelection([])
behave incorrectly when the user has clicked a cluster. These methods check for(this.selection && this.selection.index !== undefined)
but if the most recent click was on a cluster, selection looks like{cluster: 0}
which doesn't pass that condition.This leads
isSelected(clusterIndex)
to return false andsetSelection([])
andunselectItem([])
to be a no-op and the next time the user callsgetSelection()
it will return the cluster again. The current workaround is to settimeline.selection.index
to a value, but that definitely isn't intuitive.