cleaner approach to disable activatablesManager distance check if space-event

This commit is contained in:
Hanusiak Piotr 2022-02-07 14:22:43 +01:00
parent 81272fbb3c
commit d480150728
5 changed files with 15 additions and 5 deletions

View file

@ -957,11 +957,9 @@ export class GameScene extends DirtyScene {
this.gameMap.onPropertyChange(GameMapProperties.JITSI_ROOM, (newValue, oldValue, allProps) => {
if (newValue === undefined) {
this.activatablesManager.enableSelectingByDistance();
layoutManagerActionStore.removeAction("jitsi");
this.stopJitsi();
} else {
this.activatablesManager.disableSelectingByDistance();
const openJitsiRoomFunction = () => {
const roomName = jitsiFactory.getRoomName(newValue.toString(), this.instance);
const jitsiUrl = allProps.get(GameMapProperties.JITSI_URL) as string | undefined;
@ -972,7 +970,6 @@ export class GameScene extends DirtyScene {
} else {
this.startJitsi(roomName, undefined);
}
this.activatablesManager.enableSelectingByDistance();
layoutManagerActionStore.removeAction("jitsi");
};