private IDiagramModel getReactionBlockDiagramModel() { var reactionBlockName = DiagramManager.PkModel.BuildConfiguration.Reactions.Name; var project = _context.CurrentProject; var reactionBlock = project.ReactionBlockCollection.FindByName(reactionBlockName); if (reactionBlock == null) { return(null); } if (reactionBlock.DiagramModel != null) { return(reactionBlock.DiagramModel); } initializeDiagramManagerFor(reactionBlock); _view.DisplayEductsRight(reactionBlock.DiagramModel); _layerLayouter.PerformLayout(reactionBlock.DiagramModel, null); reactionBlock.DiagramModel.IsLayouted = true; return(reactionBlock.DiagramModel); }
public void LayoutReactionDiagram(IContainerBase containerBase) { var diagramModel = containerBase as IDiagramModel; foreach (var reactionNode in containerBase.GetAllChildren <ReactionNode>()) { reactionNode.DisplayEductsRight = false; } _layerLayouter.PerformLayout(containerBase, null); if (diagramModel != null) { diagramModel.IsLayouted = true; } }