Home > @visualization-tools/core > IHitTestComponent > hitTest
Perform the test.
Signature:
hitTest(entity: TEntityTrait<TUpdateArg, TTraits>, dataId: number, position: IReadonlyVec2<Float32Array>, updateArg: TUpdateArg): boolean;
| Parameter | Type | Description |
|---|---|---|
| entity | TEntityTrait<TUpdateArg, TTraits> | The entity to test. |
| dataId | number | The segment id of the entity, specific to the data connector. |
| position | IReadonlyVec2<Float32Array> | The position of the cursor in css space. |
| updateArg | TUpdateArg | Specific to the current plot type. |
Returns:
boolean
true if under the cursor.