Edit documentation exemples
This commit is contained in:
parent
f20c39f6a4
commit
854d8775d5
2 changed files with 7 additions and 7 deletions
|
@ -49,7 +49,7 @@ Example:
|
|||
let helloWorldPopup;
|
||||
|
||||
// Open the popup when we enter a given zone
|
||||
helloWorldPopup = WA.room.onEnterZone('myZone', () => {
|
||||
helloWorldPopup = WA.room.onEnterLayer("myZone").subscribe(() => {
|
||||
WA.ui.openPopup("popupRectangle", 'Hello world!', [{
|
||||
label: "Close",
|
||||
className: "primary",
|
||||
|
@ -57,13 +57,13 @@ helloWorldPopup = WA.room.onEnterZone('myZone', () => {
|
|||
// Close the popup when the "Close" button is pressed.
|
||||
popup.close();
|
||||
}
|
||||
});
|
||||
}]);
|
||||
}]);
|
||||
});
|
||||
|
||||
// Close the popup when we leave the zone.
|
||||
WA.room.onLeaveZone('myZone', () => {
|
||||
WA.room.onLeaveLayer("myZone").subscribe(() => {
|
||||
helloWorldPopup.close();
|
||||
});
|
||||
})
|
||||
```
|
||||
|
||||
### Add custom menu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue