@linear_non/stellar-libs 1.1.3 → 1.1.4
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/Smooth/index.js +8 -2
package/package.json
CHANGED
package/src/Smooth/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Scrollbar from "../ScrollBar"
|
|
2
2
|
import { kitStore } from "@linear_non/stellar-kit"
|
|
3
3
|
import { emitter, EVENTS } from "@linear_non/stellar-kit/events"
|
|
4
|
-
import { qs, qsa, bounds } from "@linear_non/stellar-kit/utils"
|
|
4
|
+
import { qs, qsa, bounds, Debug } from "@linear_non/stellar-kit/utils"
|
|
5
5
|
|
|
6
6
|
export default class Smooth {
|
|
7
7
|
constructor(obj) {
|
|
@@ -54,7 +54,7 @@ export default class Smooth {
|
|
|
54
54
|
tick = ({ current }) => {
|
|
55
55
|
const { isSmooth, isResizing } = kitStore.flags
|
|
56
56
|
if (!isSmooth || isResizing) return
|
|
57
|
-
console.log("
|
|
57
|
+
console.log("Smooth Tick: ", current)
|
|
58
58
|
|
|
59
59
|
this.current = current
|
|
60
60
|
this.transformSections()
|
|
@@ -135,6 +135,8 @@ export default class Smooth {
|
|
|
135
135
|
this.getSections()
|
|
136
136
|
this.transformSections()
|
|
137
137
|
kitStore.flags.isResizing = false
|
|
138
|
+
|
|
139
|
+
console.log("Smooth Update", this.elems)
|
|
138
140
|
}
|
|
139
141
|
|
|
140
142
|
clean() {
|
|
@@ -143,6 +145,8 @@ export default class Smooth {
|
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
on() {
|
|
148
|
+
console.log("Smooth On")
|
|
149
|
+
|
|
146
150
|
emitter.on(EVENTS.APP_TICK, this.tick)
|
|
147
151
|
emitter.on(EVENTS.APP_RESIZE, this.resize)
|
|
148
152
|
}
|
|
@@ -162,6 +166,8 @@ export default class Smooth {
|
|
|
162
166
|
const root = kitStore.currentPage || document
|
|
163
167
|
this.elems = elems || qsa("[data-smooth]", root)
|
|
164
168
|
|
|
169
|
+
console.log("Smooth Init: ", this.elems)
|
|
170
|
+
|
|
165
171
|
this.scrollbar = new Scrollbar({
|
|
166
172
|
container: kitStore.currentPage,
|
|
167
173
|
})
|