Giter VIP home page Giter VIP logo

Comments (8)

VinylFox avatar VinylFox commented on May 8, 2024

It only worked with ST 1.x, but I just updated it.

Try out the latest commit (cf08c13) and let me know how it works for you.

from ext.ux.touch.swipetabs.

synapze avatar synapze commented on May 8, 2024

I've implemented the latest build for ST 2 and most of it seems fine. However the only issue I'm having is that it seems to skip one of the tabs when I slide to the next tab on the right. Example:
I have 4 tabs : Tab 1, Tab 2, Tab 3, Tab 4. Swiping from 1 to 2 is fine but when swiping from 2 to 3 it jumps straight to 4 instead of sliding to 3. When swiping back from 4 to 3 its fine and swiping from 3 to 2 is fine.
Hope that makes sense. Any help would be greatly appreciated.

from ext.ux.touch.swipetabs.

VinylFox avatar VinylFox commented on May 8, 2024

I noticed that behavior as well and I have a fix for it that im testing locally.

Also playing around with allowing the panel to move while you swipe to give a better visual swipe effect.

from ext.ux.touch.swipetabs.

synapze avatar synapze commented on May 8, 2024

Hi VinylFox, how did you go with developing a fix for the tab skip behaviour. Is it worth trying to implement a fix myself or have you nailed it?

from ext.ux.touch.swipetabs.

asifkhalil avatar asifkhalil commented on May 8, 2024

Hi VinylFox, i am facing a same problem, one tab is skipped while right direction. Kindly tell us, how to fix this problem.

from ext.ux.touch.swipetabs.

synapze avatar synapze commented on May 8, 2024

Hi asifkhalil,
The item count is wrong when swiping left. The fix is as follows:

Open the SwipeTabs.js file and look for the following line within the onSwipteLeft method.

this.cmp.setActiveItem(this.cmp.getActiveItem().idx + 1);

and replace it with

this.cmp.setActiveItem(this.cmp.getActiveItem().idx);

from ext.ux.touch.swipetabs.

asifkhalil avatar asifkhalil commented on May 8, 2024

thanks synapze, left swipe is working fine now.

from ext.ux.touch.swipetabs.

tonno avatar tonno commented on May 8, 2024

For some reason swipe on the first tab would not work with that fix, I had to replace the old line with this:

    if (this.cmp.getActiveItem().idx === 0) {
      this.cmp.setActiveItem(this.cmp.getActiveItem().idx + 1);
    }
    else {
      this.cmp.setActiveItem(this.cmp.getActiveItem().idx);
    }

from ext.ux.touch.swipetabs.

Related Issues (2)

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.