Skip to content
This repository was archived by the owner on Feb 24, 2023. It is now read-only.

Commit 1f7f7fe

Browse files
author
Łukasz Florczak
committed
Change prepend & append functions to insertBefore (fix #21)
1 parent c5d3e60 commit 1f7f7fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Agile.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@
172172
firstSlide.classList.add('agile__slide--cloned')
173173
lastSlide.classList.add('agile__slide--cloned')
174174
175-
this.el.track.prepend(lastSlide)
176-
this.el.track.append(firstSlide)
175+
this.el.track.insertBefore(lastSlide, this.el.slides[0])
176+
this.el.track.insertBefore(firstSlide, this.el.slides[this.slidesCount].nextSibling)
177177
}
178178
179179
// Prepare autoplay

0 commit comments

Comments
 (0)