Generic wrapper for cancelable events emitted by clustering components.
The component emits a CancelableEvent<T> before performing a side-effect. The consumer can inspect Data, and set Cancel = true to prevent the default behavior.
CancelableEvent<T>
Data
Cancel = true
<mj-cluster-scatter (BeforePointClick)="onBeforeClick($event)"></mj-cluster-scatter> Copy
<mj-cluster-scatter (BeforePointClick)="onBeforeClick($event)"></mj-cluster-scatter>
onBeforeClick(event: CancelableEvent<ClusterPoint>): void { if (event.Data.ClusterId === -1) { event.Cancel = true; // suppress click on outliers }} Copy
onBeforeClick(event: CancelableEvent<ClusterPoint>): void { if (event.Data.ClusterId === -1) { event.Cancel = true; // suppress click on outliers }}
Payload type carried by the event.
Set to true to cancel the default operation that would follow.
true
The event payload.
Generic wrapper for cancelable events emitted by clustering components.
The component emits a
CancelableEvent<T>before performing a side-effect. The consumer can inspectData, and setCancel = trueto prevent the default behavior.Example