Outline container hovered
Following exemple show an outline when mouse hover it and hide outline when mouse leave it.
x
const fnoToken = "<YOUR-FNO-TOKEN>"; // provide from backoffice
const fnoMapId = "<MAP-ID>" // id of the map to load
let FnoMapManager;
window.addEventListener("load", function(){
FnoMapManager = window.FnoMapManager;
FnoMapManager.initViewerMode(fnoToken)
// enable mouse event listener
FnoMapManager.sendEvent('setMouseListener', {state: true});
FnoMapManager.registerEvent("mouseOverContainer", (data) => {
FnoMapManager.sendEvent("setOutlineContainer", {"state":true, "id_container":data.container.id});
});
FnoMapManager.registerEvent("mouseOutContainer", (data) => {
FnoMapManager.sendEvent("setOutlineContainer", {"state":false, "id_container":data.container.id});
});
});