comments/annotations/annotationcollection
module
Classes
module:comments/annotations/annotationcollection~AnnotationCollection
Type Definitions
module:comments/annotations/annotationcollection~AnnotationBlurEventmodule:comments/annotations/annotationcollection~AnnotationFocusEvent
Functions
bindAnnotationCollections( options = { options.filter, options.source, options.target } ) → voidmodule:comments/annotations/annotationcollection~bindAnnotationCollectionsA helper function that binds two AnnotationCollections and allows filtering items based on the passed callback.
Since
refreshPositioningsorts the annotations by removing and inserting items, the binding implemented by thebindTo()method is lost. This is why this helper needs to be used.This helper is used by the annotations UIs to filter which annotations from the main annotation collection should be handled by a given annotations UI.
Parameters
options : objectAn object with configuration options.
Propertiesoptions.filter : ( annotation: Annotation ) => booleanFiltering function that gets an annotation and should return
trueif the annotation should be copied to thetargetcollection.options.source : AnnotationCollectionThe source collection from which the annotations will be taken.
options.target : AnnotationCollectionThe target collection that will be synced to the source collection.
Returns
void