1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 01:06:01 +08:00

Altered drag and right click controls

This commit is contained in:
Oli 2023-01-09 21:44:02 +00:00
parent a44b58b19a
commit 883e585b65

View File

@ -146,12 +146,9 @@ namespace XNodeEditor {
selectionBox = new Rect(boxStartPos, boxSize);
Repaint();
}
} else if (e.button == 1 || e.button == 2) {
//check drag threshold for larger screens
if (e.delta.magnitude > dragThreshold) {
panOffset += e.delta * zoom;
isPanning = true;
}
} else if (e.button == 2) {
panOffset += e.delta * zoom;
isPanning = true;
}
break;
case EventType.MouseDown:
@ -277,7 +274,7 @@ namespace XNodeEditor {
Repaint();
currentActivity = NodeActivity.Idle;
} else if (e.button == 1 || e.button == 2) {
} else if (e.button == 1) {
if (!isPanning) {
if (IsDraggingPort) {
draggedOutputReroutes.Add(WindowToGridPosition(e.mousePosition));