@linear_non/stellar-libs 1.0.20 → 1.0.22

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linear_non/stellar-libs",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Reusable JavaScript libraries for Non-Linear Studio projects.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -13,7 +13,6 @@ export default class Smooth {
13
13
  this.sections = null
14
14
  this.scrollbar = null
15
15
  this.dpr = Math.max(1, Math.round(window.devicePixelRatio || 1))
16
- this.init()
17
16
  }
18
17
 
19
18
  getSections() {
@@ -83,10 +82,8 @@ export default class Smooth {
83
82
  const extra = (parent && parent.transform) || 0
84
83
  const translate = this.current * speed
85
84
  const transform = translate - offset - extra
86
-
87
85
  const start = top - translate
88
86
  const end = bottom - translate
89
-
90
87
  const isVisible = end > 0 && start < vh
91
88
 
92
89
  return { isVisible, transform }
@@ -152,12 +149,6 @@ export default class Smooth {
152
149
  on() {
153
150
  emitter.on(EVENTS.APP_TICK, this.tick)
154
151
  emitter.on(EVENTS.APP_RESIZE, this.resize)
155
-
156
- if (document.readyState === "complete") {
157
- this.update()
158
- } else {
159
- window.addEventListener("load", () => this.update(), { once: true })
160
- }
161
152
  }
162
153
 
163
154
  off() {
@@ -173,5 +164,6 @@ export default class Smooth {
173
164
  })
174
165
 
175
166
  this.on()
167
+ this.update(this.elems)
176
168
  }
177
169
  }
@@ -36,7 +36,12 @@ export default class SplitonScroll {
36
36
  this.scrub = scrub
37
37
  this.once = once
38
38
 
39
+ <<<<<<< HEAD
39
40
  // this.initScrollTrigger()
41
+ =======
42
+ if (!this.splitText[0]) return
43
+
44
+ >>>>>>> origin
40
45
  this.addObserver()
41
46
  }
42
47
 
@@ -65,10 +70,12 @@ export default class SplitonScroll {
65
70
  }
66
71
 
67
72
  handleEnter() {
68
- console.log(this.targets)
69
-
73
+ <<<<<<< HEAD
70
74
  const split = splitText(this.targets)
71
75
 
76
+ =======
77
+ const split = splitText(this.splitText)
78
+ >>>>>>> origin
72
79
  split.on(EVENTS.APP_SPLITTEXT_READY, splits => {
73
80
  this.splits = splits
74
81
  this.hasSplit = true