コード例 #1
0
        public override void Initialize(IModelService modelService, IDiagramService diagramService)
        {
            base.Initialize(modelService, diagramService);

            //_crossLayoutGroupConnectorRouter = CrossLayoutGroupConnectorRouter(diagramService);
            _rootLayoutEngine = CreateLayoutEngine(diagramService);

            DiagramService.DiagramChanged += OnDiagramChanged;
        }
コード例 #2
0
        public override void Initialize(IModelService modelService, IDiagramService diagramService)
        {
            base.Initialize(modelService, diagramService);

            var layoutCalculator = new IncrementalLayoutCalculator(_layoutPriorityProvider);

            _incrementalLayoutEngine = new IncrementalLayoutEngine(layoutCalculator, diagramService);

            DiagramService.DiagramChanged += OnDiagramChanged;
        }
コード例 #3
0
        public AutoArrangingDiagram(IReadOnlyModel model)
            : base(model)
        {
            _incrementalLayoutEngine     = new IncrementalLayoutEngine();
            _layoutActionExecutor        = new LayoutActionExecutorVisitor(this);
            _automaticLayoutCancellation = new CancellationTokenSource();
            _diagramActionQueue          = new Queue <DiagramAction>();
            _diagramActionArrivedEvent   = new AutoResetEvent(false);

            ShapeAdded      += OnShapeAdded;
            ShapeRemoved    += OnShapeRemoved;
            NodeSizeChanged += OnNodeSizeChanged;

            Task.Run(() => ProcessDiagramShapeActionsAsync(_automaticLayoutCancellation.Token));
        }
コード例 #4
0
 public AutoLayoutDiagramPlugin(ILayoutPriorityProvider layoutPriorityProvider)
 {
     _incrementalLayoutEngine = new IncrementalLayoutEngine(layoutPriorityProvider);
 }