A simple interface that can be used to react to clicks on regions of INodeStyles etc.
Inheritance Hierarchy
IClickListener
Remarks
GraphEditorInputMode will query the IModelItem's lookup method for this interface if it has detected clicks. If the item yields an instance of this interface and the click was inside the getHitTestable, then onClicked is invoked.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.IClickListener
See Also
Methods
Gets an IHitTestable that can be used to check if onClicked should be invoked.
Returns
- ↪IHitTestable
- A hit testable that can determine whether onClicked should be invoked by a given click.
Called by the framework to indicate that the IModelItem has been clicked by the user at the specified location.
Remarks
This method is called by click for the IModelItems that yielded an instance of this interface.
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 to use for the click operation.
- location - Point
- The location of the click
Static Methods
Creates an implementation of the interface IClickListener from the given definition.
Remarks
The given object must contain exactly the abstract members of the IClickListener interface. No member may be omitted and no additional members can be added. While additional custom members can later be added directly on the instance, this is discouraged.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- getHitTestable - function():IHitTestable
Gets an IHitTestable that can be used to check if onClicked should be invoked.
This property holds the implementation for getHitTestable.
- onClicked - function(IInputModeContext, Point):void
Called by the framework to indicate that the IModelItem has been clicked by the user at the specified location.
This property holds the implementation for onClicked.
Returns
- ↪IClickListener
- An instance of the IClickListener interface based on the given definition.