43aad4ab14
Implementation of LayersFlattener Implementation of Setting properties of a layer form script Update show/hide layer form script Update unit test of LayersIteratorTest
39 lines
1.3 KiB
HTML
39 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<script src="http://play.workadventure.localhost/iframe_api.js"></script>
|
|
</head>
|
|
<body>
|
|
<button id="sendchat">Send chat message</button>
|
|
<script>
|
|
document.getElementById('sendchat').onclick = () => {
|
|
WA.sendChatMessage('Hello world!', 'Mr Robot');
|
|
}
|
|
</script>
|
|
<div id="chatSent"></div>
|
|
<script>
|
|
WA.onChatMessage((message => {
|
|
const chatDiv = document.createElement('p');
|
|
chatDiv.innerText = message;
|
|
document.getElementById('chatSent').append(chatDiv);
|
|
}));
|
|
</script>
|
|
<div>
|
|
<label for="show/hideLayer">Metadata Layer : </label><input type="checkbox" id="show/hideLayer" name="visible" value="show" checked>
|
|
</div>
|
|
<script>
|
|
document.getElementById('show/hideLayer').onclick = () => {
|
|
if (document.getElementById('show/hideLayer').checked) {
|
|
WA.showLayer('Metadata');
|
|
}
|
|
else {
|
|
WA.hideLayer('Metadata');
|
|
}
|
|
}
|
|
</script>
|
|
<script>
|
|
WA.setProperty('start', 'openWebsite', 'https://www.wikipedia.org/');
|
|
</script>
|
|
</body>
|
|
</html>
|