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
See Also
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
Static Methods
Wraps a hit testable handler into an IHitTestable 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
- The hit testable handler instance to wrap.
Signature Details
function(context: IInputModeContext, location: Point) : boolean
A delegate version of the IHitTestable interface.Parameters
- context - IInputModeContext
- location - Point
Returns
- boolean
Returns
- ↪IHitTestable
- An IHitTestable implementation that wraps the provided handler.