Explorar o código

callback was moved from some function

Pavel Leshkovich %!s(int64=6) %!d(string=hai) anos
pai
achega
00a8e03ce2
Modificáronse 1 ficheiros con 4 adicións e 2 borrados
  1. 4 2
      examples/js/controls/OrbitControls.js

+ 4 - 2
examples/js/controls/OrbitControls.js

@@ -429,11 +429,13 @@ THREE.OrbitControls = function ( object, domElement ) {
 
 	function isPanEvent( event ) {
 
-		return scope.panKeys.some( function ( key ) {
+		var hasKey = function ( key ) {
 
 			return event[ key ];
 
-		} );
+		};
+
+		return scope.panKeys.some( hasKey );
 
 	}