@everymatrix/casino-collections-providers 1.39.0 → 1.39.2

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": "@everymatrix/casino-collections-providers",
3
- "version": "1.39.0",
3
+ "version": "1.39.2",
4
4
  "main": "index.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "d3dbfca9fcdc2d9df9a01f60f283ed699ec828fb"
38
+ "gitHead": "fb533d03670d53bd356680ae1d7e216c391909d0"
39
39
  }
@@ -90,7 +90,7 @@
90
90
 
91
91
  const setNumberOfVisibleSlides = ():void => {
92
92
  //needed for finding the beginning and end of the slider
93
- numberOfVisibleSlides = Math.round(categoriesSlider.offsetWidth / slideWidth);
93
+ numberOfVisibleSlides = Math.floor(categoriesSlider.offsetWidth / slideWidth);
94
94
  }
95
95
 
96
96
  const goToSlide = ():void => {
@@ -99,7 +99,6 @@
99
99
  }
100
100
 
101
101
  const sliderScrollLeft = ():void => {
102
- if(numberOfVisibleSlides >= numberOfSlides) return;
103
102
  if (currentSlide === 0) {
104
103
  currentSlide = numberOfSlides - numberOfVisibleSlides;
105
104
  } else if(currentSlide - numberOfVisibleSlides < -1){
@@ -111,7 +110,6 @@
111
110
  }
112
111
 
113
112
  const sliderScrollRight = ():void => {
114
- if(numberOfVisibleSlides >= numberOfSlides) return;
115
113
  if(currentSlide === numberOfSlides - numberOfVisibleSlides){
116
114
  currentSlide = 0;
117
115
  } else if(numberOfSlides - numberOfVisibleSlides < currentSlide + 1){
@@ -181,18 +179,20 @@
181
179
  <div class="CasinoCollectionsProviders {mobile ? 'Mobile' : ''} {type === 'vendor' ? 'Providers' : 'Collections'}">
182
180
  <div class="CategoriesHeader">
183
181
  <p class="Title"> {type == 'vendor' ? $_('providers') : $_('collections')} </p>
184
- <div class="ButtonsContainer">
185
- <button on:click={() => sliderScrollLeft()}>
186
- <svg id="Component_46_2" data-name="Component 46 – 2" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 16 24.656">
187
- <path id="Path_36" data-name="Path 36" d="M12.328,16,0,3.672,3.672,0l8.656,8.656L20.984,0l3.672,3.672Z" transform="translate(14.656 0) rotate(90)" fill="#fff"/>
188
- </svg>
189
- </button>
190
- <button on:click={() => sliderScrollRight()}>
191
- <svg id="Component_46_2" data-name="Component 46 – 2" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 16 24.656">
192
- <path id="Path_36" data-name="Path 36" d="M12.328,16,0,3.672,3.672,0l8.656,8.656L20.984,0l3.672,3.672Z" transform="translate(0 24.656) rotate(-90)" fill="#fff"/>
193
- </svg>
194
- </button>
195
- </div>
182
+ {#if numberOfSlides > numberOfVisibleSlides}
183
+ <div class="ButtonsContainer">
184
+ <button on:click={() => sliderScrollLeft()}>
185
+ <svg id="Component_46_2" data-name="Component 46 – 2" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 16 24.656">
186
+ <path id="Path_36" data-name="Path 36" d="M12.328,16,0,3.672,3.672,0l8.656,8.656L20.984,0l3.672,3.672Z" transform="translate(14.656 0) rotate(90)" fill="#fff"/>
187
+ </svg>
188
+ </button>
189
+ <button on:click={() => sliderScrollRight()}>
190
+ <svg id="Component_46_2" data-name="Component 46 – 2" xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 16 24.656">
191
+ <path id="Path_36" data-name="Path 36" d="M12.328,16,0,3.672,3.672,0l8.656,8.656L20.984,0l3.672,3.672Z" transform="translate(0 24.656) rotate(-90)" fill="#fff"/>
192
+ </svg>
193
+ </button>
194
+ </div>
195
+ {/if}
196
196
  </div>
197
197
 
198
198
  <div class="CategoriesSlider" bind:this={categoriesSlider}>