CreateNodeTouchController

open class CreateNodeTouchController: TouchInputController

Represents a controller that handles touch input by drawing new nodes. Inherits the TouchInputController class.

  • Initializes a new instance of the CreateNodeTouchController class.

    Parameter

    Parameter diagram: The diagram instance, to which the newly created node will be added.

    Parameter

    Parameter nodeType: The type of the node to create.

    Returns

    A new instance of the CreateNodeTouchController class.

    Declaration

    Swift

    public init (diagram: Diagram, nodeType: NSObject.Type)

    Parameters

    diagram

    The diagram instance, to which the newly created node will be added.

    nodeType

    The type of the node to create.

    Return Value

    A new instance of the CreateNodeTouchController 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.

    Declaration

    Swift

    open override func onTouchDown(_ position:Point, positionB:Point)

    Parameters

    position

    The point where the user has touched the surface.

    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.

    Declaration

    Swift

    open override func onTouchMove(_ position:Point, positionB:Point)

    Parameters

    position

    The point where the user has moved their finger.

    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.

    Declaration

    Swift

    open override func onTouchUp(_ position:Point, positionB:Point)

    Parameters

    position

    The point where the user has lift their finger.

    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.

    Declaration

    Swift

    open override func onCancel(_ position:Point, positionB:Point)

    Parameters

    position

    The point where the user’s finger was located when the action was canceled.

    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.