@linear_non/stellar-kit 2.1.20 → 2.1.21
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/events/Raf.js +3 -4
- package/package.json +1 -1
package/events/Raf.js
CHANGED
|
@@ -35,9 +35,8 @@ export default class Raf {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
tick = () => {
|
|
38
|
-
|
|
38
|
+
if (kitStore.flags.isResizing) return
|
|
39
39
|
const { target, current, ease } = this.scroll
|
|
40
|
-
if (isResizing) return
|
|
41
40
|
|
|
42
41
|
this.scroll.current = lerp(current, target, ease)
|
|
43
42
|
this.scroll.rounded = Math.round(this.scroll.current * 100) / 100
|
|
@@ -134,7 +133,7 @@ export default class Raf {
|
|
|
134
133
|
gsap.ticker.add(this.tick)
|
|
135
134
|
emitter.on(EVENTS.APP_SCROLL, this.onScroll)
|
|
136
135
|
emitter.on(EVENTS.APP_MOUSEMOVE, this.onMouseMove)
|
|
137
|
-
emitter.on(EVENTS.
|
|
136
|
+
emitter.on(EVENTS.APP_SMOOTH_RESIZE, this.onAppResize)
|
|
138
137
|
window.addEventListener("pagehide", () => this.stop)
|
|
139
138
|
window.addEventListener("pageshow", () => this.resume)
|
|
140
139
|
}
|
|
@@ -143,7 +142,7 @@ export default class Raf {
|
|
|
143
142
|
gsap.ticker.remove(this.tick)
|
|
144
143
|
emitter.off(EVENTS.APP_SCROLL, this.onScroll)
|
|
145
144
|
emitter.off(EVENTS.APP_MOUSEMOVE, this.onMouseMove)
|
|
146
|
-
emitter.off(EVENTS.
|
|
145
|
+
emitter.off(EVENTS.APP_SMOOTH_RESIZE, this.onAppResize)
|
|
147
146
|
window.removeEventListener("pagehide", () => this.stop)
|
|
148
147
|
window.removeEventListener("pageshow", () => this.resume)
|
|
149
148
|
}
|