Interface that is implemented for elements that can be hit or picked in a coordinate system.
Inheritance Hierarchy
IHitTestable
Related Programming Samples
- 07 Hit-Testing
- Customize which area of a node can be hovered and clicked
- 07 Hit-Testing
- Customize which area of a edge can be hovered and clicked
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.IHitTestable
See Also
CanvasComponent,
ICanvasObjectDescriptor,
ICanvasObject,
Complex Custom Indicator Installer,
IHitTestable,
Separating Style and Renderer,
Customizing Predefined Styles,
Hit-testing
Methods
Determines if something has been hit at the given coordinates in the world coordinate system.
Remarks
Implementations should inspect the hitTestRadius and take the value into account when performing hit tests. This allows the user to hit elements even if the zoom level is very small and allows for accurate hit tests at greater zoom levels.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IInputModeContext
- the context the hit test is performed in
- location - Point
- the coordinates in world coordinate system
Returns
- ↪boolean
- whether something has been hit
Constants
An IHitTestable that always returns true.
See Also
An IHitTestable that always returns false.
Static Methods
Wrap a handler into an interface.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- handler - function(IInputModeContext, Point):boolean
Signature Details
function(context: IInputModeContext, location: Point) : boolean
A delegate version of the IHitTestable interface.Parameters
- context - IInputModeContext
- location - Point
Returns
- boolean