private void removeItem(GoObject itemToDelete) { if (itemToDelete.IsAnImplementationOf <MoleculeNode>()) { RemoveMoleculeNode((MoleculeNode)itemToDelete); } else if (itemToDelete.IsAnImplementationOf <ReactionNode>()) { RemoveReactionNode((ReactionNode)itemToDelete); } }
protected override bool ComputeInsideMarginsSkip(GoObject child) { if (child.IsAnImplementationOf <GoLink>()) { return(true); } if (child.IsAnImplementationOf <PortNode>()) { return(true); } return(base.ComputeInsideMarginsSkip(child)); }
public override bool Remove(GoObject obj) { if (obj.IsAnImplementationOf <IBaseNode>() && DiagramModel != null) { DiagramModel.RemoveNodeId(obj as IBaseNode); } return(base.Remove(obj)); }
public override void Add(GoObject obj) { if (obj == null) { return; } base.Add(obj); //DiagramModel is null in deserialization process therefore fill DiagramModel._nodes in DiagramSerializer.XmlDocumentToModel if (obj.IsAnImplementationOf <IBaseNode>() && DiagramModel != null) { DiagramModel.AddNodeId(obj as IBaseNode); } }