public void QueryPossibleConnections(SelectionMenu menu, DiagramViewModel diagramViewModel, ConnectorViewModel startConnector, Vector2 mousePosition) { if (startConnector.ConnectorForType.FullName == typeof(ElementNode).FullName) { menu.Items.Clear(); var vm = InvertGraphEditor.CurrentDiagramViewModel; var category = new SelectionMenuCategory() { Title = "Connect" }; menu.AddItem(category); menu.AddItem(new SelectionMenuItem("Connect", "Create View Node and Connect to : Element", () => { ViewNode viewNode = new ViewNode(); vm.AddNode(viewNode, vm.LastMouseEvent.LastMousePosition); diagramViewModel.GraphData.AddConnection(startConnector.ConnectorFor.DataObject as IConnectable, viewNode.ElementInputSlot); }), category); } }
public ViewNodeViewModel(ViewNode graphItemObject, DiagramViewModel diagramViewModel) : base(graphItemObject, diagramViewModel) { }
public ViewNodeViewModelBase(ViewNode graphItemObject, uFrame.Editor.GraphUI.ViewModels.DiagramViewModel diagramViewModel) : base(graphItemObject, diagramViewModel) { }