@iris.interactive/handcook 2.6.6 → 2.6.7

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.6",
3
+ "version": "2.6.7",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
@@ -101,12 +101,10 @@ export class HcSlider {
101
101
  // on crée la div wrapper et on insére les slider item dedans
102
102
  const wrapperElement = document.createElement("div");
103
103
  wrapperElement.classList.add("swiper-wrapper");
104
- this.slider.appendChild(wrapperElement);
105
- this.slider.querySelectorAll('.swiper-wrapper').forEach(wrapper => {
106
- items.forEach(item => {
107
- wrapper.appendChild(item);
108
- });
104
+ items.forEach(item => {
105
+ wrapperElement.appendChild(item);
109
106
  });
107
+ this.slider.appendChild(wrapperElement);
110
108
 
111
109
  // On ajout les différentes div utile en fonction des options passées
112
110
  if (this.slider.hasAttribute('data-hc-slider-pagination')) {
@@ -146,7 +144,7 @@ export class HcSlider {
146
144
 
147
145
  initOptions() {
148
146
  this.options = {
149
- slidesPerView: 4,
147
+ slidesPerView: "auto",
150
148
  pagination: false,
151
149
  navigation: false,
152
150
  mousewheel: {