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