aboutsummaryrefslogtreecommitdiffstats
path: root/web/index.js
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-09-05 16:47:44 +0300
committerTulir Asokan <tulir@maunium.net>2020-09-05 16:48:27 +0300
commit47f3d3fdee2445a5f87b9e04971e820e234a5e59 (patch)
tree0ac2e6c32ca422d5c6da735dd3476eef9c8c570a /web/index.js
parent993b4af5497339b1976441299da3c5a91d9c5d07 (diff)
Stop using public class fields (ref #8)
Diffstat (limited to 'web/index.js')
-rw-r--r--web/index.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/index.js b/web/index.js
index dbd5e5c..6e4451e 100644
--- a/web/index.js
+++ b/web/index.js
@@ -49,13 +49,13 @@ class App extends Component {
}
}, error => this.setState({ loading: false, error }))
- this.imageObserver = new IntersectionObserver(this.observeImageIntersection, {
+ this.imageObserver = new IntersectionObserver(this.observeImageIntersections, {
rootMargin: "100px",
})
- this.sectionObserver = new IntersectionObserver(this.observeSectionIntersection, {})
+ this.sectionObserver = new IntersectionObserver(this.observeSectionIntersections)
}
- observeImageIntersection = intersections => {
+ observeImageIntersections(intersections) {
for (const entry of intersections) {
const img = entry.target.children.item(0)
if (entry.isIntersecting) {
@@ -68,7 +68,7 @@ class App extends Component {
}
}
- observeSectionIntersection = intersections => {
+ observeSectionIntersections(intersections) {
for (const entry of intersections) {
const packID = entry.target.getAttribute("data-pack-id")
const navElement = document.getElementById(`nav-${packID}`)
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage