AnnotationCollection (comments/annotations)
@ckeditor/ckeditor5-comments/src/annotations/annotationcollection
A collection of annotations.
It implements methods for managing annotations and creates a focus tracker for them to make it easier to manage the focus for all annotations.
AnnotationCollection
fires event-focus when an annotation
becomes focused and event-blur when all annotations
lose focus.
Filtering
Properties
-
isFocused : Boolean
module:comments/annotations/annotationcollection~AnnotationCollection#isFocused
Equals to
true
when one of the annotation in the collection is focused.
Methods
-
constructor( [ annotations ] )
module:comments/annotations/annotationcollection~AnnotationCollection#constructor
Parameters
[ annotations ] : Iterable.<Annotation>
Initial annotations.
-
add( annotation )
module:comments/annotations/annotationcollection~AnnotationCollection#add
-
destroy()
module:comments/annotations/annotationcollection~AnnotationCollection#destroy
Destroys all bindings and clears the collection.
-
getByInnerView( innerView ) → Annotation
module:comments/annotations/annotationcollection~AnnotationCollection#getByInnerView
-
getByView( view ) → Annotation
module:comments/annotations/annotationcollection~AnnotationCollection#getByView
-
refreshPositioning()
module:comments/annotations/annotationcollection~AnnotationCollection#refreshPositioning
Refreshes the positioning of all annotations and sorts them topmost and leftmost.
-
remove( annotation )
module:comments/annotations/annotationcollection~AnnotationCollection#remove
Events
-
blur( eventInfo )
module:comments/annotations/annotationcollection~AnnotationCollection#event:blur
Fired when all annotations become blurred.
Parameters
eventInfo : EventInfo
An object containing information about the fired event.
-
focus( eventInfo, annotation )
module:comments/annotations/annotationcollection~AnnotationCollection#event:focus
Fired when an annotation becomes active.
Parameters
eventInfo : EventInfo
An object containing information about the fired event.
annotation : Annotation
An annotation that was focused.
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.