feat: Add middle mouse button panning support
- Support middle mouse button (wheel) for map panning alongside left button - Middle button drag always enables panning regardless of edit mode - Change cursor to hand icon during middle button panning for clarity - Left button panning remains unchanged (mode-dependent behavior preserved) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -76,11 +76,18 @@ namespace AGVNavigationCore.Controls
|
||||
}
|
||||
}
|
||||
|
||||
// 팬 시작 (우클릭 또는 중간버튼)
|
||||
// 팬 시작 (좌클릭 - 모드에 따라)
|
||||
_isPanning = true;
|
||||
_lastMousePosition = e.Location;
|
||||
Cursor = Cursors.SizeAll;
|
||||
}
|
||||
else if (e.Button == MouseButtons.Middle)
|
||||
{
|
||||
// 중간 버튼: 항상 팬 (어떤 모드든 상관없이)
|
||||
_isPanning = true;
|
||||
_lastMousePosition = e.Location;
|
||||
Cursor = Cursors.Hand;
|
||||
}
|
||||
else if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
// 컨텍스트 메뉴 (편집 모드에서만)
|
||||
@@ -166,6 +173,15 @@ namespace AGVNavigationCore.Controls
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
else if (e.Button == MouseButtons.Middle)
|
||||
{
|
||||
// 중간 버튼 드래그 종료
|
||||
if (_isPanning)
|
||||
{
|
||||
_isPanning = false;
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UnifiedAGVCanvas_MouseWheel(object sender, MouseEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user