Allow middle-click drag as substitute for right-click drag

This commit is contained in:
Nettika 2026-01-29 23:15:34 -08:00
parent e93b63bb9d
commit 54137379c7
No known key found for this signature in database

View file

@ -703,7 +703,7 @@ function onCanvasMouseDown(event: MouseEvent) {
scaleDragState.isDragging = true
scaleDragState.handleInfo = handleInfo
scaleDragState.isRightDrag = event.button === 2
scaleDragState.isRightDrag = event.button === 2 || event.button === 1
scaleDragState.startMousePosition.copy(mouse)
// Store starting scales and positions for all selected objects
@ -760,7 +760,7 @@ function onCanvasMouseDown(event: MouseEvent) {
rotateDragState.isDragging = true
rotateDragState.axis = axis
rotateDragState.isRightDrag = event.button === 2
rotateDragState.isRightDrag = event.button === 2 || event.button === 1
// Store starting rotations for all selected objects
const selectedMeshes = sceneStore.selectedObjects.map((o) => o.mesh)
@ -794,7 +794,7 @@ function onCanvasMouseDown(event: MouseEvent) {
dragState.isDragging = true
dragState.axis = axis
dragState.isRightDrag = event.button === 2
dragState.isRightDrag = event.button === 2 || event.button === 1
dragState.startMousePosition.copy(mouse)
// Store original positions and calculate center