add package
This commit is contained in:
@@ -82,3 +82,48 @@ diff --git a/cjs/swiper/type.d.ts b/cjs/swiper/type.d.ts
|
||||
+ navigation?: boolean | SwiperNavigation | TNode;
|
||||
nextMargin?: string | number;
|
||||
previousMargin?: string | number;
|
||||
diff --git a/es/shared/hover.mjs b/es/shared/hover.mjs
|
||||
--- a/es/shared/hover.mjs
|
||||
+++ b/es/shared/hover.mjs
|
||||
@@ -50,29 +50,33 @@
|
||||
add: function add() {
|
||||
- if (ctx.current.disabledHover || !ctx.current.className) return;
|
||||
- if (!el.classList.contains(ctx.current.className)) {
|
||||
- el.classList.add(ctx.current.className);
|
||||
+ var current = ctx.current;
|
||||
+ if (!current || current.disabledHover || !current.className) return;
|
||||
+ if (!el.classList.contains(current.className)) {
|
||||
+ el.classList.add(current.className);
|
||||
}
|
||||
},
|
||||
remove: function remove() {
|
||||
- if (ctx.current.className) el.classList.remove(ctx.current.className);
|
||||
+ var current = ctx.current;
|
||||
+ if (current && current.className) el.classList.remove(current.className);
|
||||
},
|
||||
clearTimers: function clearTimers() {
|
||||
ctx.timers.forEach(function (t) {
|
||||
return window.clearTimeout(t);
|
||||
});
|
||||
ctx.timers = [];
|
||||
},
|
||||
downHandler: function downHandler() {
|
||||
- if (ctx.current.disabledHover) return;
|
||||
+ var current = ctx.current;
|
||||
+ if (!current || current.disabledHover) return;
|
||||
ctx.clearTimers();
|
||||
ctx.timers.push(window.setTimeout(function () {
|
||||
ctx.add();
|
||||
- }, ctx.current.startTime));
|
||||
+ }, current.startTime));
|
||||
},
|
||||
upHandler: function upHandler() {
|
||||
- if (ctx.current.disabledHover) return;
|
||||
+ var current = ctx.current;
|
||||
+ if (!current || current.disabledHover) return;
|
||||
ctx.clearTimers();
|
||||
ctx.timers.push(window.setTimeout(function () {
|
||||
ctx.remove();
|
||||
- }, ctx.current.stayTime));
|
||||
+ }, current.stayTime));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user