Giter Site home page Giter Site logo

Comments (3)

lyfeyaj avatar lyfeyaj commented on August 29, 2024

@arcxyz Nice Feature!
I create a PR from your repo, and will review it later. But there is a little bug: lets say there are 3 slides, starting at 1, when click next, 1 is moving faster than 2.

from swipe.

arcxyz avatar arcxyz commented on August 29, 2024

I made some changes to the slide function, could you check it now?

from swipe.

morer avatar morer commented on August 29, 2024

@arcxyz Great Job
But I found that if I change the ratio of each slide, like this:
width = options.partial ? containerWidth*0.8 : containerWidth; element.style.width = (slides.length * width) + 'px'; partialPos = { hidden: containerWidth, prev: -containerWidth*0.7, middle: containerWidth*0.1, next: containerWidth*0.9 };

I clicked next and the next slide does not appear, and then I checked slide direction definition

var direction = Math.abs(index-to) / (index-to); // 1: backward, -1: forward

and I change
if (options.partial) { if (direction === -1) {
to

if (options.partial) { if (natural_direction === -1) {
in function slide, the next slide shows up.

from swipe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.