Ver Fonte

fix the order of events in onMouseWheel

makc há 7 anos atrás
pai
commit
6ab03f44db
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      examples/js/controls/OrbitControls.js

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

@@ -765,9 +765,10 @@ THREE.OrbitControls = function ( object, domElement ) {
 		event.preventDefault();
 		event.stopPropagation();
 
+		scope.dispatchEvent( startEvent );
+
 		handleMouseWheel( event );
 
-		scope.dispatchEvent( startEvent ); // not sure why these are here...
 		scope.dispatchEvent( endEvent );
 
 	}