@pushword/js-helper 0.0.100 → 0.0.101

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": "@pushword/js-helper",
3
- "version": "0.0.100",
3
+ "version": "0.0.101",
4
4
  "description": "Pushword front end helpers. ",
5
5
  "author": "Robin@PiedWeb <contact@piedweb.com>",
6
6
  "license": "MIT",
@@ -105,13 +105,13 @@ class ScrollXEnhancer {
105
105
  arrowRight = '<div class="scroll-right relative left-[calc(100vw-62px)] -mt-[44px] top-1/3 z-20 h-[44px] w-[44px] cursor-pointer select-none rounded-full border border-gray-200 bg-white pt-[3px] text-center text-3xl leading-none text-gray-500 hover:text-gray-700" onclick="scrollX(this)">›</div>',
106
106
  arrowLeft = '<div class="scroll-left relative left-[22px] top-1/3 z-20 h-[44px] w-[44px] cursor-pointer select-none rounded-full border border-gray-200 bg-white pt-[3px] text-center text-3xl leading-none text-gray-500 hover:text-gray-700" onclick="scrollX(this)">‹</div>',
107
107
  ) {
108
- this.arrowLeft = arrowLeft
109
- this.arrowRight = arrowRight
110
108
  window.scrollLeft = this.scrollLeft
111
109
  window.scrollX = this.scrollX
112
110
  window.manageScrollXControllerVisibility = this.manageScrollXControllerVisibility
113
111
 
114
112
  document.querySelectorAll(selector).forEach((element) => {
113
+ this.arrowLeft = element.dataset.arrowleft ?? arrowLeft
114
+ this.arrowRight = element.dataset.arrowright ?? arrowRight
115
115
  element.classList.remove(selector)
116
116
  this.enhanceScrollX(element)
117
117
  this.mouseSliderX(element)