Load different plans into the scene
<div class="product" data-roomle-id="__SOME_ROOMLE_ID_1__">
<div>Product 1</div>
</div>
<div class="product" data-roomle-id="__SOME_ROOMLE_ID_2__">
<div>Product 2</div>
</div>
<div class="product" data-roomle-id="__SOME_ROOMLE_ID_3__">
<div>Product 3</div>
</div>const buttons = document.querySelectorAll('.product');
[...buttons].forEach((button) => {
button.addEventListener('click', (productDomNode) => {
const target = productDomNode.target;
let roomleId = target.getAttribute('data-roomle-id') || target.parentElement.getAttribute('data-roomle-id');
if (!roomleId) {
return;
}
configurator.ui.loadObject(roomleId);
});
});Last updated