public void FollowDiagramNodes(IReadOnlyCollection <ModelNodeId> nodeIds)
        {
            var autoMoveMode = _lastDiagram.Nodes.Count > nodeIds.Count
                ? ViewportAutoMoveMode.Contain
                : ViewportAutoMoveMode.Center;

            DiagramViewportViewModel.SetFollowDiagramNodesMode(autoMoveMode);
            DiagramViewportViewModel.FollowDiagramNodes(nodeIds);
        }
Esempio n. 2
0
        public void FollowDiagramNodes(IReadOnlyList <IDiagramNode> diagramNodes)
        {
            var autoMoveMode = Diagram.Nodes.Count > diagramNodes.Count
                ? ViewportAutoMoveMode.Contain
                : ViewportAutoMoveMode.Center;

            DiagramViewportViewModel.SetFollowDiagramNodesMode(autoMoveMode);
            DiagramViewportViewModel.FollowDiagramNodes(diagramNodes);
        }
 public void KeepDiagramCentered()
 {
     DiagramViewportViewModel.SetFollowDiagramNodesMode(ViewportAutoMoveMode.Center);
     DiagramViewportViewModel.FollowDiagramNodes(_lastDiagram.Nodes.Select(i => i.Id).ToArray());
 }
Esempio n. 4
0
 public void KeepDiagramCentered()
 {
     DiagramViewportViewModel.SetFollowDiagramNodesMode(ViewportAutoMoveMode.Center);
     DiagramViewportViewModel.FollowDiagramNodes(Diagram.Nodes);
 }