documentationfor yFiles for HTML 2.6

CreateEdgeInputMode

An IInputMode for interactively creating edges between nodes and edges in an IGraph displayed in a CanvasComponent or GraphComponent.

Inheritance Hierarchy
CreateEdgeInputMode
Implemented Interfaces

Remarks

This class provides a factory callback that the final edge creation will be delegated to. The styling of the newly created edge can be customized via the edgeDefaults. Defaults can be automatically adjusted in response to the various events that will be triggered by this instance during the edge creation. Use the dummyEdgeGraph property to modify the appearance of the dummy edge. This class uses IPortCandidateProvider instances found in the ILookup of the nodes in the graph to display port candidates and to finally create the edges.

This mode is exclusive by default.

Examples

Typically the CreateEdgeInputMode is installed as child mode of a GraphEditorInputMode and can be retrieved from the createEdgeInputMode property.
Getting the CreateEdgeInputMode from its parent input mode
const createEdgeInputMode = mode.createEdgeInputMode
The following example shows how to configure touch gestures without long press.
Configure touch gestures without long press
mode.moveViewportInputMode.allowSinglePointerMovement = true
mode.createBendInputMode.prepareRecognizerTouch =
  TouchEventRecognizers.TOUCH_DOWN_PRIMARY
mode.createEdgeInputMode.prepareRecognizerTouch =
  TouchEventRecognizers.TOUCH_DOWN_PRIMARY
mode.handleInputMode.pressedRecognizerTouch =
  TouchEventRecognizers.TOUCH_DOWN_PRIMARY
mode.lassoSelectionInputMode.prepareRecognizerTouch =
  TouchEventRecognizers.TOUCH_DOWN_PRIMARY
mode.marqueeSelectionInputMode.pressedRecognizerTouch =
  TouchEventRecognizers.TOUCH_DOWN_PRIMARY
mode.moveInputMode.pressedRecognizerTouch =
  TouchEventRecognizers.TOUCH_DOWN_PRIMARY

Related Reading in the Developer's Guide

An overview of this input mode is given in the section Creating Edges. Additionally, customization of edge creation is discussed in section Customizing User Interaction: Creating Edges.

Type Details

yfiles module
view-editor
yfiles-umd modules
view-editor, view-table, view
Legacy UMD name
yfiles.input.CreateEdgeInputMode

See Also

Constructors

Properties

Methods

Events