Skip to content

circular mode and touch #8

@jchautreux

Description

@jchautreux

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;
            };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions