Type Alias: AnnotatedTextEmits
@ghentcdh/vue-component-annotated-text / AnnotatedTextEmits
Type Alias: AnnotatedTextEmits
AnnotatedTextEmits =
object
Defined in: types/emits/AnnotatedTextEmits.ts:10
Properties
annotation-click
annotation-click: [
MouseEventPayload
,MouseEvent
]
Defined in: types/emits/AnnotatedTextEmits.ts:22
Emitted when an annotation (both span and gutter) is clicked.
Arg
annotation Annotation object that was clicked
Arg
mouseEvent normal dom mouse event
annotation-create-begin
annotation-create-begin: [
CreateAnnotationState
]
Defined in: types/emits/AnnotatedTextEmits.ts:68
Emitted when the mouse is pressed down on plain text.
If listening to this emit, createState.initAnnotation should be called to initialize the new annotation being created.
Arg
createState object holding the state of the being created annotation
annotation-create-end
annotation-create-end: [
CreateAnnotationState
]
Defined in: types/emits/AnnotatedTextEmits.ts:84
Emitted when during creation the mouse is released.
Arg
createState object holding the state of the being created annotation. The annotation field holds the newly created annotation.
annotation-creating
annotation-creating: [
CreateAnnotationState
]
Defined in: types/emits/AnnotatedTextEmits.ts:78
Emitted on every mouse move while creating an annotation.
The newEnd and newStart fields of the createState object can be edited.
createState.updateCreating needs to be called to confirm the new position after the mouse move.
Arg
createState object holding the state of the being created annotation
annotation-double-click
annotation-double-click: [
MouseEventPayload
,MouseEvent
]
Defined in: types/emits/AnnotatedTextEmits.ts:28
Emitted when an annotation (both span and gutter) is double clicked.
Arg
annotation Annotation object that was clicked
Arg
mouseEvent normal dom mouse event
annotation-mouse-leave
annotation-mouse-leave: [
Annotation
,MouseEvent
]
Defined in: types/emits/AnnotatedTextEmits.ts:114
Emitted when the mouse stops hovering over annotations
Arg
hoveredAnnotation The hovered annotation
Arg
mouseEvent Normal dom mouse event
annotation-mouse-over
annotation-mouse-over: [
Annotation
,MouseEvent
]
Defined in: types/emits/AnnotatedTextEmits.ts:105
Emitted when the mouse goes over new annotations
Arg
hoveredAnnotations The hovered annotation
Arg
mouseEvent Normal dom mouse event
annotation-select
annotation-select: [
Annotation
,MouseEvent
]
Defined in: types/emits/AnnotatedTextEmits.ts:16
Emitted when an annotation (both span and gutter) is clicked.
Arg
annotation Annotation object that was clicked
Arg
mouseEvent normal dom mouse event
annotation-update-begin
annotation-update-begin: [
UpdateAnnotationState
]
Defined in: types/emits/AnnotatedTextEmits.ts:42
Emitted when the user starts updating an annotation, so when the mouse is clicked down and the listenToOnUpdateStart prop is true.
The newStart and newEnd fields of the updateState can be edited.
updateState.confirmStartUpdating should be called in order to confirm the start of the update
Arg
updateState object holding the state of the update
annotation-update-end
annotation-update-end: [
UpdateAnnotationState
]
Defined in: types/emits/AnnotatedTextEmits.ts:60
Emitted when during an update the mouse is released.
Arg
updateState updateState object containing the new annotation object in the annotation field.
annotation-updating
annotation-updating: [
UpdateAnnotationState
]
Defined in: types/emits/AnnotatedTextEmits.ts:53
Emitted every time the user moves their cursor while updating an annotation. Only emitted if the listenToOnUpdating prop is true.
The newStart and newEnd fields of the updateState can be edited.
updateState.confirmUpdate should be called in order to confirm the new position after the mouse move.
Arg
updateState object holding the state of the update
key-pressed
key-pressed: [
KeyboardEvent
,UpdateAnnotationState
,CreateAnnotationState
,UserState
]
Defined in: types/emits/AnnotatedTextEmits.ts:94
Emitted whenever any key is pressed. Can be used to reset updating or creating states
Arg
keyEvent key event object
Arg
updateState {UpdateAnnotationState}
Arg
createState {CreateAnnotationState}
Arg
userState {UserState}
user-action-state-change
user-action-state-change: [
UserActionState
,UserActionState
]
Defined in: types/emits/AnnotatedTextEmits.ts:123
Emitted whenever the internal user state changes
Arg
oldState Old user action state
Arg
newState New user action state