private void OnDiagramChanged(DiagramEvent diagramEvent)
        {
            var diagram           = diagramEvent.NewDiagram;
            var diagramLayoutInfo = _layoutAlgorithm.Calculate(diagram);

            DiagramService.ApplyLayout(diagramLayoutInfo);
        }
Exemplo n.º 2
0
        private void OnDiagramChanged(DiagramEvent diagramEvent)
        {
            if (diagramEvent.ShapeEvents.All(i => !IsLayoutTriggeringChange(i)))
            {
                return;
            }

            var diagram           = diagramEvent.NewDiagram;
            var diagramLayoutInfo = _layoutAlgorithm.Calculate(diagram);

            DiagramService.ApplyLayout(diagramLayoutInfo);
        }
Exemplo n.º 3
0
        private void OnDiagramChanged([NotNull] DiagramEventBase diagramEvent)
        {
            switch (diagramEvent)
            {
                case DiagramNodeRectChangedEvent _:
                case DiagramConnectorRouteChangedEvent _:
                    return;
            }

            var diagram = diagramEvent.NewDiagram;
            var diagramLayoutInfo = _layoutAlgorithm.Calculate(diagram);
            DiagramService.ApplyLayout(diagramLayoutInfo);
        }