Class SystemEdgeDragHelper<TEdge>
SystemEdgeDragHelper handles dragging of edges in the graph. Implements the EdgeDragHelper
Namespace: Mechatronics.SystemGraph
Syntax
public class SystemEdgeDragHelper<TEdge> : EdgeDragHelper where TEdge : SystemEdge, new()
Type Parameters
| Name | Description |
|---|---|
| TEdge | The type of the t edge. |
Constructors
SystemEdgeDragHelper(IEdgeConnectorListener)
Initializes a new instance of the SystemEdgeDragHelper<TEdge> class.
Declaration
public SystemEdgeDragHelper(IEdgeConnectorListener listener)
Parameters
| Type | Name | Description |
|---|---|---|
| IEdgeConnectorListener | listener | The listener event. |
Fields
Disable
Represents if this edge is disabled
Declaration
public bool Disable
Field Value
| Type | Description |
|---|---|
| Boolean |
m_CompatiblePorts
The compatible ports
Declaration
protected List<Port> m_CompatiblePorts
Field Value
| Type | Description |
|---|---|
| List<Port> |
m_GraphView
The graph view
Declaration
protected GraphView m_GraphView
Field Value
| Type | Description |
|---|---|
| GraphView |
m_Listener
The listener of connection
Declaration
protected readonly IEdgeConnectorListener m_Listener
Field Value
| Type | Description |
|---|---|
| IEdgeConnectorListener |
s_nodeAdapter
The node adapter
Declaration
protected static NodeAdapter s_nodeAdapter
Field Value
| Type | Description |
|---|---|
| UnityEditor.Experimental.GraphView.NodeAdapter |
Properties
draggedPort
The port the edge is being dragged from.
Declaration
public override Port draggedPort { get; set; }
Property Value
| Type | Description |
|---|---|
| Port | The dragged port. |
Overrides
edgeCandidate
The edge being dragged.
Declaration
public override Edge edgeCandidate { get; set; }
Property Value
| Type | Description |
|---|---|
| Edge | The edge candidate. |
Overrides
GraphView
Sets the graph view.
Declaration
public GraphView GraphView { set; }
Property Value
| Type | Description |
|---|---|
| GraphView | The graph view. |
resetPositionOnPan
Gets or sets a value indicating whether [reset position on pan].
Declaration
public bool resetPositionOnPan { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
|
Methods
HandleMouseDown(MouseDownEvent)
Handle mouse down event.
Declaration
public override bool HandleMouseDown(MouseDownEvent evt)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseDownEvent | evt | The event. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the drag has been started. False otherwise. |
Overrides
HandleMouseMove(MouseMoveEvent)
Handle mouse move event.
Declaration
public override void HandleMouseMove(MouseMoveEvent evt)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseMoveEvent | evt | The event. |
Overrides
HandleMouseUp(MouseUpEvent)
Handle mouse up event.
Declaration
public override void HandleMouseUp(MouseUpEvent evt)
Parameters
| Type | Name | Description |
|---|---|---|
| MouseUpEvent | evt | The event. |
Overrides
Reset(Boolean)
Reset the state of the drag helper.
Declaration
public override void Reset(bool didConnect = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | didConnect | Whether the connection was successful or not. View will not reset in this case. |