+
0;
+ }
+ return event.deltaY < 0;
+ },
+
+ handleWheel(event) {
+ if (this.scrollDirectionIsUp(event)) {
+ this.skipNext = false;
+ } else {
+ this.skipNext = true;
+ }
+ },
+ handleScrollTop() {
+ const stickyParent = document.getElementById("stickyParent");
+ const stickyTop = stickyParent.offsetTop;
+ let scrollTop = window.scrollY;
+ var position = stickyParent.getBoundingClientRect();
+ if (
+ window.pageYOffset >= stickyTop &&
+ position.bottom >=
+ (window.innerHeight || document.documentElement.clientHeight)
+ ) {
+ console.log(this.activeIndex);
+ this.swiperRef.mousewheel.enable();
+ this.swiperRef.allowTouchMove = true;
+ } else {
+ this.swiperRef.mousewheel.disable();
+ this.swiperRef.allowTouchMove = true;
+ }
+ this.lastScrollY = scrollTop;
+ },
+ handleScroll() {
+ const windowHeight = window.innerHeight;
+ const lastSlide = document.querySelector(".main:last-child");
+ const lastSlidePosition = lastSlide.getBoundingClientRect().top;
+ if (lastSlidePosition <= windowHeight && lastSlidePosition >= 0) {
+ this.lastSlideReached = true;
+ this.isScrollingUp = window.scrollY < this.scrollPosition;
+ } else {
+ this.lastSlideReached = false;
+ }
+ this.scrollPosition = window.scrollY;
+ },
},
components: {
Swiper,