Skip to content

Commit e153019

Browse files
committed
Chore: Remove unused intersection observers
1 parent c9adf13 commit e153019

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/behaviors/attach/attach.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -495,23 +495,6 @@ const createBehavior = ({ $, $el, el, self, attachEvent, cache, settings, dispat
495495
const $scrolls = $el.scrollParent({ all: true });
496496
attachEvent($scrolls, 'scroll', self.onScroll);
497497
},
498-
499-
bindObservers() {
500-
const viewport = settings.containToScroll
501-
? $el.scrollParent()
502-
: $el.clippingParent();
503-
504-
self.observer = new IntersectionObserver(
505-
self.onIntersectionChange,
506-
{
507-
root: viewport.el(),
508-
threshold: [0, 0.01, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.99, 1.0],
509-
rootMargin: '50px',
510-
},
511-
);
512-
el.offsetHeight;
513-
self.observer.observe(el);
514-
},
515498
});
516499

517500
const onCreated = ({ self, settings }) => {
@@ -527,7 +510,6 @@ const onCreated = ({ self, settings }) => {
527510
};
528511

529512
const onDestroyed = ({ self }) => {
530-
// self.observer?.disconnect();
531513
wrapFunction(self.onScroll?.cancel)();
532514
wrapFunction(self.onResize?.cancel)();
533515
};

0 commit comments

Comments
 (0)