Skip to content

Commit 0c360b7

Browse files
authored
Merge pull request #15140 from leshkovichpvl/orbital-control/custom-pan-keys
OrbitControls: support panning with left mouse + shift key
2 parents 666edb3 + fa5956a commit 0c360b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/js/controls/OrbitControls.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//
1212
// Orbit - left mouse / touch: one-finger move
1313
// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
14-
// Pan - right mouse, or left mouse + ctrl/metaKey, or arrow keys / touch: two-finger move
14+
// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move
1515

1616
THREE.OrbitControls = function ( object, domElement ) {
1717

@@ -679,7 +679,7 @@ THREE.OrbitControls = function ( object, domElement ) {
679679

680680
case scope.mouseButtons.LEFT:
681681

682-
if ( event.ctrlKey || event.metaKey ) {
682+
if ( event.ctrlKey || event.metaKey || event.shiftKey ) {
683683

684684
if ( scope.enablePan === false ) return;
685685

0 commit comments

Comments
 (0)