@iris.interactive/handcook 2.6.12 → 2.6.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iris.interactive/handcook",
3
- "version": "2.6.12",
3
+ "version": "2.6.13",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
@@ -16,13 +16,16 @@
16
16
 
17
17
  import LazyLoad from "vanilla-lazyload";
18
18
 
19
- const hc_lazyload = function() {
20
- return new LazyLoad({
19
+ const hc_lazyload = function (options = {}) {
20
+
21
+ options = Object.assign({
21
22
  elements_selector: '[data-hc-src], [data-hc-bg], [data-hc-bg-hidpi]',
22
23
  data_src: 'hc-src',
23
24
  data_bg: 'hc-bg',
24
25
  data_bg_hidpi: 'hc-bg-hidpi'
25
- });
26
+ }, options)
27
+
28
+ return new LazyLoad(options);
26
29
  }
27
30
 
28
31
  export default hc_lazyload;
@@ -157,6 +157,7 @@ export class HcSlider {
157
157
 
158
158
  // layout
159
159
  swiper.$el.find('.swiper-wrapper').addClass('hc-slider-wrapper');
160
+ swiper.$el.addClass('hc-slider-initialized');
160
161
 
161
162
  // slide item
162
163
  swiper.$el.find('.swiper-slide').addClass('hc-slider-slide');