public MoveEdgeControlPointAction(IGTFEdgeModel edgeModel, int edgeIndex, Vector2 newPosition, float newTightness) { EdgeModel = edgeModel; EdgeIndex = edgeIndex; NewPosition = newPosition; NewTightness = newTightness; }
public static List <IGTFEdgeModel> GetDropEdgeModelsToDelete(IGTFEdgeModel edge) { List <IGTFEdgeModel> edgeModelsToDelete = new List <IGTFEdgeModel>(); if (edge.ToPort != null && edge.ToPort.Capacity == PortCapacity.Single) { foreach (var edgeToDelete in edge.ToPort.ConnectedEdges) { if (!ReferenceEquals(edgeToDelete, edge)) { edgeModelsToDelete.Add(edgeToDelete); } } } if (edge.FromPort != null && edge.FromPort.Capacity == PortCapacity.Single) { foreach (var edgeToDelete in edge.FromPort.ConnectedEdges) { if (!ReferenceEquals(edgeToDelete, edge)) { edgeModelsToDelete.Add(edgeToDelete); } } } return(edgeModelsToDelete); }
public EdgeControlPoint(EdgeControl edgeControl, IGTFEdgeModel edgeModel, int controlPointIndex) { m_EdgeControl = edgeControl; m_EdgeModel = edgeModel; m_ControlPointIndex = controlPointIndex; AddToClassList(k_ClassName); RegisterCallback <PointerDownEvent>(OnPointerDown); RegisterCallback <PointerMoveEvent>(OnPointerMove); RegisterCallback <PointerUpEvent>(OnPointerUp); style.position = Position.Absolute; }
public static IGraphElement CreateEdge(this ElementBuilder elementBuilder, IStore store, IGTFEdgeModel model) { var ui = new Edge(); ui.Setup(model, store, elementBuilder.GraphView); return(ui); }
public AddControlPointOnEdgeAction(IGTFEdgeModel edgeModel, int atIndex, Vector2 position) { EdgeModel = edgeModel; AtIndex = atIndex; Position = position; }
public SetEdgeEditModeAction(IGTFEdgeModel edgeModel, bool value) { EdgeModel = edgeModel; Value = value; }
public RemoveEdgeControlPointAction(IGTFEdgeModel edgeModel, int edgeIndex) { EdgeModel = edgeModel; EdgeIndex = edgeIndex; }