Merge pull request #9547 from druiz17/tabletBug

Grabbing tablet while in edit mode
This commit is contained in:
Seth Alves 2017-01-31 13:37:11 -08:00 committed by GitHub
commit d835de2fec
2 changed files with 3 additions and 3 deletions

View file

@ -853,7 +853,7 @@ function MyController(hand) {
};
this.setState = function(newState, reason) {
if (isInEditMode() && (newState !== STATE_OFF &&
if ((isInEditMode() && this.grabbedEntity !== HMD.tabletID )&& (newState !== STATE_OFF &&
newState !== STATE_SEARCHING &&
newState !== STATE_OVERLAY_STYLUS_TOUCHING)) {
return;
@ -1703,7 +1703,7 @@ function MyController(hand) {
};
this.isTablet = function (entityID) {
if (entityID === HMD.tabletID) { // XXX what's a better way to know this?
if (entityID === HMD.tabletID) {
return true;
}
return false;

View file

@ -1038,7 +1038,7 @@ SelectionDisplay = (function() {
if (entityIntersection.intersects &&
(!overlayIntersection.intersects || (entityIntersection.distance < overlayIntersection.distance))) {
if (HMD.tabletID == entityIntersection.entityID) {
if (HMD.tabletID === entityIntersection.entityID) {
return;
}