public MoveDiagramNodeLayoutAction(DiagramNodeLayoutVertex diagramNodeLayoutVertex, Point2D from, Point2D to)
 {
     Vertex = diagramNodeLayoutVertex;
     From   = from;
     To     = to;
     By     = To - From;
 }
Beispiel #2
0
        public void AddDiagramNode(IDiagramNode diagramNode)
        {
            if (_diagramNodeToLayoutVertexMap.Contains(diagramNode))
            {
                throw new InvalidOperationException($"Diagram node {diagramNode} already added.");
            }

            var diagramNodeLayoutVertex = new DiagramNodeLayoutVertex(diagramNode, diagramNode.Name, diagramNode.Priority);

            _diagramNodeToLayoutVertexMap.Set(diagramNode, diagramNodeLayoutVertex);

            _relativeLayoutCalculator.OnDiagramNodeAdded(diagramNodeLayoutVertex);
        }
Beispiel #3
0
        public void AddDiagramNode(IDiagramNode diagramNode)
        {
            if (_diagramNodeToLayoutVertexMap.Contains(diagramNode.Id))
            {
                throw new InvalidOperationException($"Diagram node {diagramNode} already added.");
            }

            var diagramNodeLayoutPriority = _layoutPriorityProvider.GetPriority(diagramNode);
            var diagramNodeLayoutVertex   = new DiagramNodeLayoutVertex(diagramNode, diagramNode.Name, diagramNodeLayoutPriority);

            _diagramNodeToLayoutVertexMap.Set(diagramNode.Id, diagramNodeLayoutVertex);

            _statefulRelativeLayoutCalculator.OnDiagramNodeAdded(diagramNodeLayoutVertex);
        }
Beispiel #4
0
 public LayoutPath(DiagramNodeLayoutVertex sourceVertex, DiagramNodeLayoutVertex targetVertex,
                   IDiagramConnector diagramConnector)
     : this(new GeneralLayoutEdge(sourceVertex, targetVertex, diagramConnector))
 {
 }
 public void OnDiagramNodeRemoved(DiagramNodeLayoutVertex diagramNodeLayoutVertex)
 {
     _relativeLayout.RemoveVertex(diagramNodeLayoutVertex);
 }
 public void OnDiagramNodeAdded(DiagramNodeLayoutVertex diagramNodeLayoutVertex)
 {
     _relativeLayout.AddVertex(diagramNodeLayoutVertex);
 }