Explorar o código

Allow right clicking when TrackballControls are disabled

I was hoping that I could disable the TrackballControls so that I could
right click and "Save Image", but this event handler was missing the
enabled check.
Ford Hurley %!s(int64=8) %!d(string=hai) anos
pai
achega
b110b162d8
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      examples/js/controls/TrackballControls.js

+ 2 - 0
examples/js/controls/TrackballControls.js

@@ -579,6 +579,8 @@ THREE.TrackballControls = function ( object, domElement ) {
 
 	function contextmenu( event ) {
 
+		if ( _this.enabled === false ) return;
+
 		event.preventDefault();
 
 	}