Giter Club home page Giter Club logo

Comments (6)

lizzie avatar lizzie commented on August 17, 2024

囧, 气死我了, 怎么又有这个问题了!

from switchable.

lizzie avatar lizzie commented on August 17, 2024

@newtonniu 不对, 是我 slide 的demo 写错了. scrollx 时, 各个 panel 需要定宽的. demo 上写成 100%了, 所以出现白得了

from switchable.

nuintun avatar nuintun commented on August 17, 2024

@lizzie 呃,白的么发现,问题是下面的情况:假设有5屏、横向切换、设置circular,点击Nav中的导航,从第一屏直接切换到第五屏,正确的应该是从左向右直接滚动到第五屏!现在是从右向左,跨了二、三、四屏才到第五屏:bowtie:

from switchable.

lizzie avatar lizzie commented on August 17, 2024

@newtonniu 从第一屏到第五屏, 顺向应是跨国二三四屏的, 如果逆向从第五屏到第一屏, 是直接从第一屏到第五屏的. 这边的逻辑一直是这样的.

如果按照你说的正确的应该是从左向右从第一屏直接滚动到第五屏, 那类比从第一屏到第三或四屏, 是应该向左还是向右呢... 所以这边就不纠结了, 统一处理成从第一屏到>1的屏, 顺向跨过中间屏至目标屏. 而逆向从第五屏至首屏, 则转换下再切换, 而不是跨过中间屏回到首屏, 这样就不会出现不循环的情况了.... 嘿嘿, 简单处理了.

from switchable.

nuintun avatar nuintun commented on August 17, 2024

@lizzie 哈哈,的确是个纠结的问题,我赶脚只有一到五是逆向,其它顺向,这样在用户自己快速切换的时候赶脚更好,更有一种循环的 feel ~

from switchable.

nuintun avatar nuintun commented on August 17, 2024

这个先关掉!

from switchable.

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.