leonardo-map/malen.js

19 lines
486 B
JavaScript
Raw Normal View History

2021-05-08 23:54:36 +02:00
let helloWorldPopup;
2021-05-08 23:45:01 +02:00
2021-05-08 23:54:36 +02:00
// Open the popup when we enter a given zone
helloWorldPopup = WA.onEnterZone('malen-1', () => {
WA.openPopup("popupRectangle", 'Hello world!', [{
label: "Close",
className: "primary",
callback: (popup) => {
// Close the popup when the "Close" button is pressed.
popup.close();
}
});
}]);
// Close the popup when we leave the zone.
WA.onLeaveZone('malen-1', () => {
helloWorldPopup.close();
});