Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/js/controls/OrbitControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ THREE.OrbitControls = function ( object, domElement ) {
// The four arrow keys
this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 };

// The panning keys
this.panKeys = [ 'ctrlKey', 'metaKey' ];

// Mouse buttons
this.mouseButtons = { LEFT: THREE.MOUSE.LEFT, MIDDLE: THREE.MOUSE.MIDDLE, RIGHT: THREE.MOUSE.RIGHT };

Expand Down Expand Up @@ -679,7 +682,7 @@ THREE.OrbitControls = function ( object, domElement ) {

case scope.mouseButtons.LEFT:

if ( event.ctrlKey || event.metaKey ) {
if ( scope.panKeys.some( key => event[ key ] ) ) {

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

Expand Down