@iris.interactive/handcook 7.1.4-beta → 7.1.5-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Welcome to HandCook 👨🍳
|
|
2
|
-

|
|
3
3
|

|
|
4
4
|
[](#)
|
|
5
5
|
[](https://twitter.com/captain\_iris)
|
package/package.json
CHANGED
|
@@ -175,18 +175,6 @@ export class HcSlider {
|
|
|
175
175
|
this.options['mousewheel'] = false;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
if (this.slider.hasAttribute('data-hc-slider-lazy')) {
|
|
179
|
-
this.options['lazy'] = {
|
|
180
|
-
enabled: true,
|
|
181
|
-
checkInView: true,
|
|
182
|
-
loadPrevNext: true,
|
|
183
|
-
elementClass: 'hc-slider-lazy',
|
|
184
|
-
loadedClass: 'hc-slider-lazy-loaded',
|
|
185
|
-
loadingClass: 'hc-slider-lazy-loading',
|
|
186
|
-
preloaderClass: 'hc-slider-lazy-preloader',
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
|
|
190
178
|
this.options['watchOverflow'] = true;
|
|
191
179
|
}
|
|
192
180
|
|
|
@@ -289,17 +277,17 @@ export class HcSlider {
|
|
|
289
277
|
init: (swiper) => {
|
|
290
278
|
|
|
291
279
|
// layout
|
|
292
|
-
swiper
|
|
293
|
-
swiper
|
|
280
|
+
$(swiper.el).find('.swiper-wrapper').addClass('hc-slider-wrapper');
|
|
281
|
+
$(swiper.el).addClass('hc-slider-initialized');
|
|
294
282
|
|
|
295
283
|
// slide item
|
|
296
|
-
swiper
|
|
297
|
-
swiper
|
|
298
|
-
swiper
|
|
299
|
-
swiper
|
|
284
|
+
$(swiper.el).find('.swiper-slide').addClass('hc-slider-slide');
|
|
285
|
+
$(swiper.el).find('.swiper-slide-active').addClass('hc-slider-slide-active');
|
|
286
|
+
$(swiper.el).find('.swiper-slide-next').addClass('hc-slider-slide-next');
|
|
287
|
+
$(swiper.el).find('.swiper-slide-prev').addClass('hc-slider-slide-prev');
|
|
300
288
|
|
|
301
289
|
if (swiper.isLocked) {
|
|
302
|
-
swiper
|
|
290
|
+
$(swiper.el).addClass('hc-slider-lock');
|
|
303
291
|
}
|
|
304
292
|
|
|
305
293
|
this.slider.dispatchEvent(this.initEvent);
|
|
@@ -318,21 +306,21 @@ export class HcSlider {
|
|
|
318
306
|
slideChangeTransitionEnd: (swiper) => {
|
|
319
307
|
|
|
320
308
|
// slide item
|
|
321
|
-
swiper
|
|
309
|
+
$(swiper.el).find('.swiper-slide')
|
|
322
310
|
.removeClass('hc-slider-slide-active')
|
|
323
311
|
.removeClass('hc-slider-slide-next')
|
|
324
312
|
.removeClass('hc-slider-slide-prev');
|
|
325
|
-
swiper
|
|
326
|
-
swiper
|
|
327
|
-
swiper
|
|
313
|
+
$(swiper.el).find('.swiper-slide-active').addClass('hc-slider-slide-active');
|
|
314
|
+
$(swiper.el).find('.swiper-slide-next').addClass('hc-slider-slide-next');
|
|
315
|
+
$(swiper.el).find('.swiper-slide-prev').addClass('hc-slider-slide-prev');
|
|
328
316
|
|
|
329
317
|
//Remove tabindex
|
|
330
318
|
if (this.slider.hasAttribute('data-hc-slider-disable-arrows-focus')) {
|
|
331
|
-
swiper
|
|
319
|
+
$(swiper.el).find('.hc-slider-buttons > *').removeAttr('tabindex');
|
|
332
320
|
}
|
|
333
321
|
|
|
334
322
|
if (this.slider.hasAttribute('data-hc-slider-disable-pagination-focus')) {
|
|
335
|
-
swiper
|
|
323
|
+
$(swiper.el).find('.hc-slider-pagination > *').removeAttr('tabindex');
|
|
336
324
|
}
|
|
337
325
|
}
|
|
338
326
|
},
|