Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circular mode and touch #8

Open
jchautreux opened this issue Apr 4, 2014 · 3 comments
Open

circular mode and touch #8

jchautreux opened this issue Apr 4, 2014 · 3 comments

Comments

@jchautreux
Copy link

In circular mode, there is an issue when you want to swipe 2 slides in one time.
to reproduce:
swipe one time to the left and swipe another time before end of the first transition.
After that each another swipe move the slides slowly and the slides shifting and transitions are broken.
to correct:
simply remove transition css prop on touchstart.

correcting touch start event:

          events[utils.getNamespacedEvents('touchstart')] = function(e) {
                var event = e.originalEvent.targetTouches[0],
                     endEvent = utils.getNamespacedEvents(utils.getTransitionEndEvent());
                // trigger endEvent to be sure that no transition is effective
                self.$dom.slider.trigger(endEvent);

                coords.start.x = event.pageX;
                coords.start.y = event.pageY;

                sliderOffset = self.$dom.slider.position();

                time.start = new Date().getTime();

                isSwiping = false;
                isScrolling = false;
            };
@jchautreux
Copy link
Author

and for the android native browser, the goTo method must be updated with this (in replacement of the onEndEvent):

                 this.$dom.slider.on(endEvent, function() {
                        self.$dom.slider.off(endEvent);
                        if( oldTransition !== '')
                            self.$dom.slider.css(prop, oldTransition);
                        else
                            self.$dom.slider.css(prop, '0s');

                        callback();
                    });

@backflip
Copy link
Owner

backflip commented Apr 7, 2014

Thanks for reporting! I will have a look in the next few days.

@backflip
Copy link
Owner

backflip commented Jul 5, 2014

With the latest release, I disabled the navigation while the carousel is sliding (there were problems on non-touch devices, too). So this should not be an issue anymore.

However, I will overhaul the whole transition part anyway (it should definitely use transforms instead of animating the position property, e.g.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants