mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Fixed formatting
This commit is contained in:
parent
8c26042eef
commit
3b6135cde7
@ -499,13 +499,9 @@ namespace XNodeEditor {
|
||||
NodeEditorGUILayout.DrawPortHandle(rect, bgcol, frcol);
|
||||
}
|
||||
stoppedDraggingPort = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(stoppedDraggingPort)
|
||||
{
|
||||
if(draggedPort != null && draggedPort.IsOutput)
|
||||
{
|
||||
} else {
|
||||
if (stoppedDraggingPort) {
|
||||
if (draggedPort != null && draggedPort.IsOutput) {
|
||||
GenericMenu menu = new GenericMenu();
|
||||
graphEditor.AddContextMenuItems(menu, ConnectOnCreate);
|
||||
menu.DropDown(new Rect(Event.current.mousePosition, Vector2.zero));
|
||||
@ -532,8 +528,8 @@ namespace XNodeEditor {
|
||||
Rect windowRect = new Rect(nodePos, new Vector2(width / zoom, 30 / zoom));
|
||||
return windowRect.Contains(mousePos);
|
||||
}
|
||||
private void ConnectOnCreate(object obj = default(object))
|
||||
{
|
||||
|
||||
private void ConnectOnCreate(object obj = default(object)) {
|
||||
if (graph.nodes.Last().Ports.Where(r => r.IsInput == true).Any(r => r.ValueType == draggedPort.ValueType))
|
||||
draggedPort.Connect(graph.nodes.Last().Ports.Where(r => r.IsInput == true).Where(r => r.ValueType == draggedPort.ValueType).ToArray() [0]);
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user