Merge pull request #13402 from ctrlaltdavid/21895

Make desktop left and right mouse button actions independent
This commit is contained in:
John Conklin II 2018-06-27 12:46:11 -07:00 committed by GitHub
commit 2da3192c33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -315,7 +315,7 @@ Grabber.prototype.pressEvent = function(event) {
return;
}
if (event.isLeftButton !== true || event.isRightButton === true || event.isMiddleButton === true) {
if (event.button !== "LEFT") {
return;
}
@ -419,7 +419,7 @@ Grabber.prototype.pressEvent = function(event) {
};
Grabber.prototype.releaseEvent = function(event) {
if ((event.isLeftButton!==true || event.isRightButton===true || event.isMiddleButton===true) && !HMD.active) {
if (event.button !== "LEFT" && !HMD.active) {
return;
}