added example script for map exit
This commit is contained in:
parent
006195e8cc
commit
8f6c65384a
@ -1,14 +1,16 @@
|
||||
/// <reference path="../../front/src/iframe_api.ts" />
|
||||
var zoneName = "popUpGoToPageZone";
|
||||
var urlPricing = "https://workadventu.re/pricing";
|
||||
var urlGettingStarted = "https://workadventu.re/getting-started";
|
||||
var urlRelativeMap = "script_api.json";
|
||||
var isCoWebSiteOpened = false;
|
||||
|
||||
WA.onChatMessage((message => {
|
||||
WA.sendChatMessage('Poly Parrot says: "'+message+'"', 'Poly Parrot');
|
||||
WA.sendChatMessage('Poly Parrot says: "' + message + '"', 'Poly Parrot');
|
||||
}));
|
||||
|
||||
WA.onEnterZone(zoneName, () => {
|
||||
WA.openPopup("popUp","Open Links",[
|
||||
WA.openPopup("popUp", "Open Links", [
|
||||
{
|
||||
label: "Open Tab",
|
||||
className: "popUpElement",
|
||||
@ -18,27 +20,34 @@ WA.onEnterZone(zoneName, () => {
|
||||
})
|
||||
},
|
||||
{
|
||||
label: "Go To Page", className : "popUpElement",
|
||||
callback:(popup => {
|
||||
label: "Go To Page", className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.goToPage(urlPricing);
|
||||
popup.close();
|
||||
})
|
||||
|
||||
}
|
||||
,
|
||||
},
|
||||
{
|
||||
label: "openCoWebSite", className : "popUpElement",
|
||||
callback:(popup => {
|
||||
label: "openCoWebSite", className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.openCoWebSite(urlPricing);
|
||||
isCoWebSiteOpened = true;
|
||||
popup.close();
|
||||
})
|
||||
|
||||
}, {
|
||||
label: "load grouped map",
|
||||
className: "popUpElement",
|
||||
callback: (popup => {
|
||||
WA.loadPage(urlRelativeMap);
|
||||
popup.close();
|
||||
})
|
||||
|
||||
}]);
|
||||
})
|
||||
|
||||
WA.onLeaveZone(zoneName, () => {
|
||||
if (isCoWebSiteOpened) {
|
||||
if(isCoWebSiteOpened) {
|
||||
WA.closeCoWebSite();
|
||||
isCoWebSiteOpened = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user