fixed documentation

This commit is contained in:
jonny 2021-06-16 17:34:00 +02:00
parent c1e202b7b1
commit 1147a21dde
2 changed files with 20 additions and 1 deletions

View File

@ -187,6 +187,25 @@ Example:
WA.goToPage('https://www.wikipedia.org/');
```
### Going to a different map from the script
```
goToRoom(url: string): void
```
Load the map at url without unloading workadventure
relative urls: "../subFolder/map.json[#start-layer-name]"
global urls: "/_/global/domain/path/map.json[#start-layer-name]"
Example:
```javascript
WA.goToRoom('../otherMap/map.json');
WA.goToRoom("/_/global/<path to global map>.json#start-layer-2")
```
### Opening/closing a web page in an iFrame
```

View File

@ -39,7 +39,7 @@ WA.onEnterZone(zoneName, () => {
label: "load grouped map",
className: "popUpElement",
callback: (popup => {
WA.exitSceneTo(urlRelativeMap);
WA.goToRoom(urlRelativeMap);
popup.close();
})