drag the mouse to let a camera around an object 360 rotation

This works great! thanks! I did however notice a small bug, for some reason, if I use the right click on the mouse it stops the function of the orbit, any idea why this caused it to stop working?