-
I want to customize the behaviour of Current behaviour: What I want: I can't use |
Beta Was this translation helpful? Give feedback.
Answered by
tobimori
Sep 22, 2023
Replies: 1 comment
-
Managed to solve it like this: const count = this.instance?.slideNodes().length ?? 1
el.style.transform = `translate3d(${el.clientWidth / count}px,0px,0px)`
this.instance?.on('scroll', () => {
if (!this.instance) return
el.style.transform = `translate3d(${Math.min(
el.clientWidth,
Math.max(
(this.instance.internalEngine().location.get() / count) * -1 + el.clientWidth / count,
0
)
)}px,0px,0px)`
}) Note that in this case, my progress is exactly the same width as one image. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tobimori
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Managed to solve it like this:
Note that in this case, my progress is exactly the same width as one image.