Skip to content

Type Alias: FeatureEvents ​

ts
type FeatureEvents = object;

Properties ​

add() ​

ts
add: (evt) => void;

Event trigerred when adding an annotation

Parameters ​

evt ​

FeatureEvent

The annotation added

Returns ​

void


cancelDrawing() ​

ts
cancelDrawing: () => void;

Event trigerred when canceling drawing mode

Returns ​

void


click() ​

ts
click: (evt) => void;

Event triggered when a click completes on an annotation (mouseup without drag)

Parameters ​

evt ​

ClickEvent

Returns ​

void


completeDrawing() ​

ts
completeDrawing: (evt) => void;

Event trigerred when completing a drawing operation

Parameters ​

evt ​

FeatureEvent

Contains the ID of the completed annotation

Returns ​

void


dragend() ​

ts
dragend: (evt) => void;

Event triggered when a drag operation ends on an annotation

Parameters ​

evt ​

DragEvent

Returns ​

void


dragstart() ​

ts
dragstart: (evt) => void;

Event triggered when a drag operation starts on an annotation

Parameters ​

evt ​

DragEvent

Returns ​

void


history() ​

ts
history: (evt) => void;

Event trigerred when history state changes (after undo/redo operations)

Parameters ​

evt ​

HistoryEvent

Contains boolean flags for undo/redo availability

Returns ​

void


ts
link: (evt) => void;

Event trigerred when linking an arrow to a node or annotation

Parameters ​

evt ​

Contains the arrow and link details

arrow ​

Arrow

Link

Returns ​

void


remove() ​

ts
remove: (evt) => void;

Event trigerred when removing an annotation

Parameters ​

evt ​

FeatureEvent

The annotation removed

Returns ​

void


select() ​

ts
select: (evt) => void;

Event trigerred when selecting an annotation

Parameters ​

evt ​

FeaturesEvent

The annotation selected

Returns ​

void


unselect() ​

ts
unselect: (evt) => void;

Event trigerred when unselecting an annotation

Parameters ​

evt ​

FeaturesEvent

The annotation unselected

Returns ​

void


update() ​

ts
update: (evt) => void;

Event trigerred when updating an annotation. This fires after any modification including drag operations, style changes, scaling, etc.

Parameters ​

evt ​

Annotation

The updated annotation with all changes applied

Returns ​

void