const pixelCenter = map.getGlobalPixelCenter(...coord);
pixelCenter[0] -= 300;
map.setCenter(map.options.get('projection').fromGlobalPixels(pixelCenter, map.getZoom()));
const Swipers = Array.from(document.querySelectorAll('.slider'), n => {
return new Swiper(n.querySelector('.swiper-container'), {
loop: true,
navigation: {
nextEl: n.querySelector('.swiper-button-next'),
prevEl: n.querySelector('.swiper-button-prev'),
},
pagination: {
el: n.querySelector('.swiper-pagination'),
clickable: true,
},
breakpoints: {
640: {
slidesPerView: 2,
spaceBetween: 20,
},
768: {
slidesPerView: 4,
spaceBetween: 40,
},
1024: {
slidesPerView: 5,
spaceBetween: 50,
},
},
});
});
for(const child of elem.childNodes) { frag.appendChild(child); }
while (elem.childNodes.length) {
frag.appendChild(elem.childNodes[0]);
}
// или
frag.append(...elem.childNodes);