On Init
Use the onInit callback to select the first booth after initialization.
Code
html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
</head>
<body>
<div id="floorplan" style="width: 100%; height: 100dvh"></div>
<script type="module">
import { load } from 'https://unpkg.com/@expofp/floorplan';
load(
{ $ref: 'https://demo.expofp.com/manifest.json' },
{
element: document.querySelector('#floorplan'),
allowConsent: true,
offHistory: true,
onInit(fp) {
setTimeout(() => {
fp.selectBooth(fp.boothsList()[0].name);
}, 100);
},
},
);
</script>
</body>
</html>