OrcaSlicer-bambulab/resources/web/include/swiper/modules/manipulation/methods/appendSlide.js
Louis Rossmann c661ddc2eb
Some checks failed
My Build All / build_windows (push) Has been cancelled
My Build All / build_linux_portable (push) Has been cancelled
My Build All / build_linux_appimage (push) Has been cancelled
My Build All / build_macos (push) Has been cancelled
My Build All / Publish release assets (push) Has been cancelled
Shellcheck / Shellcheck (push) Has been cancelled
Initial release
2026-05-11 07:39:33 -05:00

27 lines
No EOL
487 B
JavaScript

export default function appendSlide(slides) {
const swiper = this;
const {
$wrapperEl,
params
} = swiper;
if (params.loop) {
swiper.loopDestroy();
}
if (typeof slides === 'object' && 'length' in slides) {
for (let i = 0; i < slides.length; i += 1) {
if (slides[i]) $wrapperEl.append(slides[i]);
}
} else {
$wrapperEl.append(slides);
}
if (params.loop) {
swiper.loopCreate();
}
if (!params.observer) {
swiper.update();
}
}