Trackball controls button binding issue

I am trying to get this done with TrackballControls. I want to rotate the object using the right button button and want to assign no function to left button. But when I assign undefined to left, the controls doesn’t work.

I want to be able to pan when I press the shift key using the right button. I think this can be done by setting noPan to true and noRotate to false when shift is pressed.

Edit: When I do this, only the pan works with the left mouse button and rotate doesn’t work at all. Strange.

this.controls.mouseButtons.RIGHT = THREE.MOUSE.ROTATE;
this.controls.mouseButtons.LEFT = undefined;
this.controls.mouseButtons.noPan = true;

Try using this instead of undefined:

this.controls.mouseButtons.LEFT = THREE.MOUSE.RIGHT;