comments/annotations/annotationcollection
module
Classes
-
module:comments/annotations/annotationcollection~AnnotationCollection
Type Definitions
-
module:comments/annotations/annotationcollection~AnnotationBlurEvent
-
module:comments/annotations/annotationcollection~AnnotationFocusEvent
Functions
-
bindAnnotationCollections( options = { options.filter, options.source, options.target } ) → void
module:comments/annotations/annotationcollection~bindAnnotationCollections
A helper function that binds two AnnotationCollections and allows filtering items based on the passed callback.
Since
refreshPositioning
sorts 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 : object
An object with configuration options.
Propertiesoptions.filter : ( annotation: Annotation ) => boolean
Filtering function that gets an annotation and should return
true
if the annotation should be copied to thetarget
collection.options.source : AnnotationCollection
The source collection from which the annotations will be taken.
options.target : AnnotationCollection
The target collection that will be synced to the source collection.
Returns
void