Browse Source

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 8 years ago
parent
commit
b110b162d8
1 changed files with 2 additions and 0 deletions
  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 ) {
 	function contextmenu( event ) {
 
 
+		if ( _this.enabled === false ) return;
+
 		event.preventDefault();
 		event.preventDefault();
 
 
 	}
 	}