@pushword/js-helper 0.0.106 → 0.0.107
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 +1 -1
- package/src/ScrollEnhancer.js +5 -5
package/package.json
CHANGED
package/src/ScrollEnhancer.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
class ScrollYEnhancer {
|
|
6
6
|
constructor(
|
|
7
7
|
selector = '.enhance-scroll-y',
|
|
8
|
-
arrow = '<div class="scroller absolute left-[128px] z-10 -mt-[10px] h-[
|
|
8
|
+
arrow = '<div class="scroller absolute left-[128px] z-10 -mt-[10px] h-[36px] w-[36px] cursor-pointer rounded-full border border-gray-200 bg-white text-center text-3xl leading-[23px] text-gray-500 hover:text-gray-700 select-none" onclick="scrollPreviousDiv(this)">⌄</div><div class="relative z-0 -mt-8 h-8 w-full bg-gradient-to-t from-white to-transparent"></div>',
|
|
9
9
|
fadeout = '<div class="sticky left-0 -top-3 z-0 -mt-3 h-3 w-full bg-gradient-to-b from-white to-transparent"></div>',
|
|
10
10
|
) {
|
|
11
11
|
window.scrollPreviousDiv = this.scrollPreviousDiv
|
|
@@ -76,13 +76,13 @@ class ScrollYEnhancer {
|
|
|
76
76
|
if (scroller.textContent === '⌄' || isAtMaxScroll) {
|
|
77
77
|
if (isAtMaxScroll) {
|
|
78
78
|
scroller.textContent = '⌃'
|
|
79
|
-
scroller.classList.add('pt-[
|
|
79
|
+
scroller.classList.add('pt-[12px]')
|
|
80
80
|
scroller.classList.add('text-gray-200')
|
|
81
81
|
}
|
|
82
82
|
return
|
|
83
83
|
} else {
|
|
84
84
|
scroller.textContent = '⌄'
|
|
85
|
-
scroller.classList.remove('pt-[
|
|
85
|
+
scroller.classList.remove('pt-[12px]')
|
|
86
86
|
scroller.classList.remove('text-gray-200')
|
|
87
87
|
}
|
|
88
88
|
}
|
|
@@ -122,8 +122,8 @@ class ScrollYEnhancer {
|
|
|
122
122
|
class ScrollXEnhancer {
|
|
123
123
|
constructor(
|
|
124
124
|
selector = '.enhance-scroll-x',
|
|
125
|
-
arrowRight = '<div class="scroll-right relative left-[calc(100vw-62px)] -mt-[
|
|
126
|
-
arrowLeft = '<div class="scroll-left relative left-[22px] top-1/3 z-20 h-[
|
|
125
|
+
arrowRight = '<div class="scroll-right relative left-[calc(100vw-62px)] -mt-[36px] top-1/3 z-20 h-[36px] w-[36px] cursor-pointer select-none rounded-full border border-gray-200 bg-white text-center text-3xl leading-none text-gray-500 hover:text-gray-700" onclick="scrollX(this)">›</div>',
|
|
126
|
+
arrowLeft = '<div class="scroll-left relative left-[22px] top-1/3 z-20 h-[36px] w-[36px] cursor-pointer select-none rounded-full border border-gray-200 bg-white text-center text-3xl leading-none text-gray-500 hover:text-gray-700" onclick="scrollX(this)">‹</div>',
|
|
127
127
|
) {
|
|
128
128
|
window.scrollLeft = this.scrollLeft
|
|
129
129
|
window.scrollX = this.scrollX
|