Table of Contents

Class ReconnectingState

Namespace
FlowGraph.Avalonia.Input.States
Assembly
FlowGraph.Avalonia.dll

State for reconnecting an existing edge by dragging its endpoint. Similar to React Flow's reconnectable edges - the edge visual updates in real-time.

public class ReconnectingState : InputStateBase, IInputState
Inheritance
ReconnectingState
Implements
Inherited Members

Constructors

ReconnectingState(Edge, bool, Node, Port, Node, Port, Point, ThemeResources)

Creates a new reconnecting state.

public ReconnectingState(Edge edge, bool draggingTarget, Node fixedNode, Port fixedPort, Node movingNode, Port movingPort, Point startPosition, ThemeResources theme)

Parameters

edge Edge

The edge being reconnected.

draggingTarget bool

True if dragging the target (input) end, false if dragging the source (output) end.

fixedNode Node

The node whose connection stays fixed.

fixedPort Port

The port that stays connected.

movingNode Node

The node we're disconnecting from.

movingPort Port

The port we're disconnecting from.

startPosition Point

Initial screen position of the cursor.

theme ThemeResources

Theme resources for styling.

Properties

IsModal

Gets whether this state blocks other interactions.

public override bool IsModal { get; }

Property Value

bool

Name

Gets the name of this state for debugging.

public override string Name { get; }

Property Value

string

Methods

CreateTempLine(Canvas)

public void CreateTempLine(Canvas canvas)

Parameters

canvas Canvas

CreateTempLine(InputStateContext)

Creates the temporary reconnection line, using RootPanel for direct rendering mode or MainCanvas for visual tree mode.

public void CreateTempLine(InputStateContext context)

Parameters

context InputStateContext

Enter(InputStateContext)

Called when entering this state.

public override void Enter(InputStateContext context)

Parameters

context InputStateContext

Exit(InputStateContext)

Called when exiting this state.

public override void Exit(InputStateContext context)

Parameters

context InputStateContext

HandleKeyDown(InputStateContext, KeyEventArgs)

Handles key down events.

public override StateTransitionResult HandleKeyDown(InputStateContext context, KeyEventArgs e)

Parameters

context InputStateContext
e KeyEventArgs

Returns

StateTransitionResult

HandlePointerMoved(InputStateContext, PointerEventArgs)

Handles pointer moved events.

public override StateTransitionResult HandlePointerMoved(InputStateContext context, PointerEventArgs e)

Parameters

context InputStateContext
e PointerEventArgs

Returns

StateTransitionResult

HandlePointerReleased(InputStateContext, PointerReleasedEventArgs)

Handles pointer released events.

public override StateTransitionResult HandlePointerReleased(InputStateContext context, PointerReleasedEventArgs e)

Parameters

context InputStateContext
e PointerReleasedEventArgs

Returns

StateTransitionResult