Hi,
I am trying to get an event when a customAnnotation is selected and unselected. I can of course is click to coincide with selection, but how do I listen on the unselected event?
Thanks,
Pramod
- pramod butte asked 3 months ago
- You must login to post comments
Dear Jim,
thank you! I have multiple annotations, how do I know which annotation was selected/unselected?
Best,
Pramod
- pramod butte answered 3 months ago
- You must login to post comments
Dear Jim,
thank you! I have multiple annotations, how do I know which annotation was selected/unselected?
Best,
Pramod
- pramod butte answered 3 months ago
-
Currently, it seems like you’ll have to pass different callbacks to each with an appropriate annotation references. Alternatively, you can override some methods of the annotation, for example “isSelected” setter. FYI, we are considering some refactoring and implementation of a new API for the Annotation Selection and related APIs.
- You must login to post comments
Hello, the Annotation API allows to subscribe to changes of the “isSelected” property via the “selectedChanged” event handler.
customAnnotation.selectedChanged.subscribe(isSelected => { if(!isSelected) console.log("unselected") });
You can check other available properties and interfaces in Typedoc
- Jim Risen answered 3 months ago
- You must login to post comments
Please login first to submit.