CreateLinkTouchController
open class CreateLinkTouchController: TouchInputController
Represents a controller that handles touch input by drawing new links. Inherits the TouchInputController class.
-
Initializes a new instance of the CreateLinkTouchController class.
Parameter
Parameter diagram: The diagram instance, to which the newly created link will be added.Parameter
Parameter linkType: The type of the link to create.
Returns
A new instance of the CreateLinkTouchController class.
Declaration
Swift
public init (diagram: Diagram, origin: DiagramNode?, linkType: NSObject.Type)
Parameters
diagram
The diagram instance, to which the newly created link will be added.
linkType
The type of the link to create.
Return Value
A new instance of the CreateLinkTouchController class.
-
Overrides TouchInputController.onTouchDown.
Parameter
Parameter position: The point where the user has touched the surface.Parameter
Parameter positionB: The point where the users has touched the surface with the second finger. -
Overrides TouchInputController.onTouchMove.
Parameter
Parameter position: The point where the user has moved their finger.Parameter
Parameter positionB: The point where the users has moved their second finger. -
Overrides TouchInputController.onTouchUp.
Parameter
Parameter position: The point where the user has lift their finger.Parameter
Parameter positionB: The point where the users has lift their second finger. -
Overrides TouchInputController.onCancel.
Parameter
Parameter position: The point where the user’s finger was located when the action was canceled.Parameter
Parameter positionB: The point where the user’s second finger was located when the action was canceled. -
Overrides TouchInputController.drawInteraction.
Parameter
Parameter canvas: A canvas instance where the controller will draw.Declaration
Swift
open override func drawInteraction(_ canvas:Canvas)
Parameters
canvas
A canvas instance where the controller will draw.