plugin updates

This commit is contained in:
Tony Volpe
2024-07-16 13:57:46 +00:00
parent 41f50eacc4
commit 8f93917880
1529 changed files with 259452 additions and 25451 deletions

View File

@@ -65,8 +65,8 @@
var namespace = slider.vars.namespace,
touch = (( "ontouchstart" in window ) || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
// deprecating this idea, as devices are being released with both of these events
eventType = "click touchend keyup",
// we add a custom event so we can differentiate manually triggering events when needed.
eventType = "click touchend keyup flexslider-click",
watchedEvent = "",
watchedEventClearTimer,
easing = easings[slider.vars.easing] || "ease",
@@ -301,7 +301,7 @@
}
// setup flags to prevent event duplication
if (watchedEvent === "") {
if (watchedEvent === "" && event.type !== "flexslider-click") {
watchedEvent = event.type;
}
methods.setToClearWatchedEvent();
@@ -326,7 +326,7 @@
}
// setup flags to prevent event duplication
if (watchedEvent === "") {
if (watchedEvent === "" && event.type !== "flexslider-click") {
watchedEvent = event.type;
}
methods.setToClearWatchedEvent();
@@ -379,7 +379,7 @@
}
// setup flags to prevent event duplication
if (watchedEvent === "") {
if (watchedEvent === "" && event.type !== "flexslider-click") {
watchedEvent = event.type;
}
methods.setToClearWatchedEvent();
@@ -433,7 +433,7 @@
}
// setup flags to prevent event duplication
if (watchedEvent === "") {
if (watchedEvent === "" && event.type !== "flexslider-click") {
watchedEvent = event.type;
}
methods.setToClearWatchedEvent();
@@ -496,7 +496,7 @@
if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
e.preventDefault();
if (!fade && slider.transitions) {
if (!fade) {
if (!slider.vars.animationLoop) {
dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
}
@@ -684,7 +684,7 @@
slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
}
slider.setProps(slideString, "", slider.vars.animationSpeed);
if (slider.transitions) {
if (!slider.vars.animationLoop || !slider.atEnd) {
slider.animating = false;
slider.currentSlide = slider.animatingTo;
@@ -703,20 +703,6 @@
slider.wrapup(dimension);
}, slider.vars.animationSpeed + 100);
} else {
var prop = slider.prop;
slider.container.each(function() {
var container = this;
var currentStyle = {};
currentStyle[prop] = container.style[prop];
container.animate([currentStyle, slider.args], { duration: slider.vars.animationSpeed, easing: easing }).onfinish = function() {
container.style[prop] = slider.args[prop];
slider.wrapup(dimension);
};
});
}
} else { // FADE:
// if (!touch) calls slider.wrapup() on fade animation end; if (touch) calls slider.wrapup() immediately
if (!touch) {
@@ -824,16 +810,17 @@
return (posCalc * ((slider.vars.rtl)?1:-1)) + "px";
}());
dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
slider.container.css("transition-duration", dur);
if (slider.transitions) {
target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + (parseInt(target)+'px') + ",0,0)";
dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
slider.container.css("transition-duration", dur);
} else {
slider.container.css("transition-timing-function", easing);
}
slider.args[slider.prop] = target;
if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }
slider.container.css('transform',target);
slider.container.css(slider.args);
};
slider.setup = function(type) {

File diff suppressed because one or more lines are too long