mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Add the full source of BambuStudio
using version 1.0.10
This commit is contained in:
parent
30bcadab3e
commit
1555904bef
3771 changed files with 1251328 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
|||
export default function prependSlide(slides) {
|
||||
const swiper = this;
|
||||
const {
|
||||
params,
|
||||
$wrapperEl,
|
||||
activeIndex
|
||||
} = swiper;
|
||||
|
||||
if (params.loop) {
|
||||
swiper.loopDestroy();
|
||||
}
|
||||
|
||||
let newActiveIndex = activeIndex + 1;
|
||||
|
||||
if (typeof slides === 'object' && 'length' in slides) {
|
||||
for (let i = 0; i < slides.length; i += 1) {
|
||||
if (slides[i]) $wrapperEl.prepend(slides[i]);
|
||||
}
|
||||
|
||||
newActiveIndex = activeIndex + slides.length;
|
||||
} else {
|
||||
$wrapperEl.prepend(slides);
|
||||
}
|
||||
|
||||
if (params.loop) {
|
||||
swiper.loopCreate();
|
||||
}
|
||||
|
||||
if (!params.observer) {
|
||||
swiper.update();
|
||||
}
|
||||
|
||||
swiper.slideTo(newActiveIndex, 0, false);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue