createAnnotation.toolkit#store¶
Summary¶
createAnnotation.toolkit#store exposes the record store behind the toolkit. Use it to look up an annotation by id or observe changes while keeping the toolkit's marker and label presentation in sync with the records.
Syntax¶
readonly AnnotationToolkit.store: AnnotationStore
readonly AnnotationToolkit.markerRenderer: AnnotationMarkerRenderer
readonly AnnotationToolkit.labelLayer: AnnotationLabelLayer
const record = toolkit.store.get(annotationId);
Returns¶
AnnotationStore - The toolkit's live store. store.get(id) gives a copy of the record or null when absent. store.onChange(listener) returns a callback that removes the listener.
Notes¶
The toolkit listens for store changes and uses markerRenderer and labelLayer for presentation. Use the toolkit's creation and update methods when working from picks or when you want it to manage interactively staged anchors.