Skip to content

Commit

Permalink
fixed broken avatar proximity interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
DerKatsche committed Nov 27, 2023
1 parent 8322c3a commit 6da3487
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export default class DoorController implements IDoorController {

@bind
private onAvatarInteractableChange(isInteractable: boolean): void {
if (isInteractable) {
if (isInteractable && this.proximityToolTipId === -1) {
this.proximityToolTipId = this.displayTooltip();
} else if (this.proximityToolTipId !== -1) {
} else if (!isInteractable && this.proximityToolTipId !== -1) {
this.bottomTooltipPresenter.hide(this.proximityToolTipId);
this.proximityToolTipId = -1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class LearningElementController
@bind
pointerOver(): void {
if (this.proximityToolTipId === -1 && this.hoverToolTipId === -1) {
this.proximityToolTipId = this.displayTooltip();
this.hoverToolTipId = this.displayTooltip();
this.scaleUpIcon();
}
}
Expand All @@ -55,12 +55,13 @@ export default class LearningElementController

@bind
private onAvatarInteractableChange(isInteractable: boolean): void {
if (isInteractable) {
if (isInteractable && this.proximityToolTipId === -1) {
this.proximityToolTipId = this.displayTooltip();
this.scaleUpIcon();
} else if (this.proximityToolTipId !== -1) {
} else if (!isInteractable && this.proximityToolTipId !== -1) {
this.bottomTooltipPresenter.hide(this.proximityToolTipId);
this.resetIconScale();
this.proximityToolTipId = -1;
}
}

Expand Down

0 comments on commit 6da3487

Please sign in to comment.