hotspot: setHeight + callbackFN
This commit is contained in:
@@ -46,7 +46,6 @@ const idmGeneralHotspotObjData = {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Funkcja inicjalizująca wybranego hotspota(addtobasket range - swiper)
|
||||
async function idmHotspotInit(id, options={}){
|
||||
try{
|
||||
@@ -149,9 +148,20 @@ async function idmHotspotInit(id, options={}){
|
||||
});
|
||||
await selectedSwiper.init();
|
||||
}
|
||||
|
||||
|
||||
if(typeof options?.callbackFn === "function") options?.callbackFn();
|
||||
|
||||
// IDM setHeight
|
||||
app_shop.fn.idmSetHeight({
|
||||
selectors: [
|
||||
`#${id} .product__prices`,
|
||||
`#${id} .product__name`,
|
||||
],
|
||||
container: `#${id} .products__wrapper`,
|
||||
});
|
||||
console.log(`Initialized hotspot #${id}`);
|
||||
}catch(err){
|
||||
console.error(idmHotspotTextObject["Wystąpił błąd z inicjalizacją. Proszę odśwież stronę"], err);
|
||||
}
|
||||
}
|
||||
|
||||
console.log("init")
|
||||
}
|
||||
Reference in New Issue
Block a user