@linear_non/stellar-libs 1.1.2 → 1.1.3
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
package/src/Smooth/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export default class Smooth {
|
|
|
12
12
|
this.sections = null
|
|
13
13
|
this.scrollbar = null
|
|
14
14
|
this.dpr = Math.max(1, Math.round(window.devicePixelRatio || 1))
|
|
15
|
+
|
|
15
16
|
this.init()
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -53,6 +54,8 @@ export default class Smooth {
|
|
|
53
54
|
tick = ({ current }) => {
|
|
54
55
|
const { isSmooth, isResizing } = kitStore.flags
|
|
55
56
|
if (!isSmooth || isResizing) return
|
|
57
|
+
console.log("Test Log: ", current)
|
|
58
|
+
|
|
56
59
|
this.current = current
|
|
57
60
|
this.transformSections()
|
|
58
61
|
}
|
|
@@ -13,7 +13,7 @@ function normalizeTargets(splitTargets) {
|
|
|
13
13
|
export default class SplitonScroll {
|
|
14
14
|
constructor({
|
|
15
15
|
el,
|
|
16
|
-
splitTargets,
|
|
16
|
+
splitText: splitTargets,
|
|
17
17
|
isReady,
|
|
18
18
|
reverse,
|
|
19
19
|
resize,
|
|
@@ -42,6 +42,7 @@ export default class SplitonScroll {
|
|
|
42
42
|
|
|
43
43
|
this._readyFired = false
|
|
44
44
|
this._rebuilding = false
|
|
45
|
+
this._entering = false
|
|
45
46
|
|
|
46
47
|
if (!this.element || !this.targets.length) {
|
|
47
48
|
this._notifyReadyOnce([])
|
|
@@ -98,6 +99,10 @@ export default class SplitonScroll {
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
async handleEnter() {
|
|
102
|
+
// Prevent double-split if already entering or already split
|
|
103
|
+
if (this._entering || this.splits) return
|
|
104
|
+
this._entering = true
|
|
105
|
+
|
|
101
106
|
const splitEmitter = splitText(this.targets)
|
|
102
107
|
|
|
103
108
|
const { splits, groups } = await new Promise(resolve => {
|
|
@@ -119,6 +124,7 @@ export default class SplitonScroll {
|
|
|
119
124
|
|
|
120
125
|
this.splits = splits
|
|
121
126
|
this.groups = groups
|
|
127
|
+
this._entering = false
|
|
122
128
|
|
|
123
129
|
this._notifyReadyOnce(splits, groups)
|
|
124
130
|
}
|