Exemple #1
0
        private DiagramNodeLayoutVertex CreateLayoutVertex(IDiagramNode diagramNode, Map <ModelNodeId, DiagramNodeLayoutVertex> diagramNodeToLayoutVertexMap)
        {
            if (diagramNodeToLayoutVertexMap.Contains(diagramNode.Id))
            {
                throw new InvalidOperationException($"Diagram node {diagramNode} already added.");
            }

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

            diagramNodeToLayoutVertexMap.Set(diagramNode.Id, diagramNodeLayoutVertex);

            return(diagramNodeLayoutVertex);
        }
Exemple #2
0
 public LayoutPath(DiagramNodeLayoutVertex sourceVertex, DiagramNodeLayoutVertex targetVertex,
                   IDiagramConnector diagramConnector)
     : this(new GeneralLayoutEdge(sourceVertex, targetVertex, diagramConnector))
 {
 }