Fixing URL not being rewritten when changing maps
This commit is contained in:
parent
3ba3b24647
commit
517b3a644b
2 changed files with 8 additions and 1 deletions
|
@ -417,6 +417,13 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||
context.stroke();
|
||||
this.circleTexture.refresh();
|
||||
|
||||
// Let's alter browser history
|
||||
let path = this.room.id;
|
||||
if (this.startLayerName) {
|
||||
path += '#'+this.startLayerName;
|
||||
}
|
||||
window.history.pushState({}, 'WorkAdventure', path);
|
||||
|
||||
// Let's pause the scene if the connection is not established yet
|
||||
if (this.connection === undefined) {
|
||||
// Let's wait 0.5 seconds before printing the "connecting" screen to avoid blinking
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue