diff --git a/nuxt-frontend/components/flutter-app-development/DevelopmentSection.vue b/nuxt-frontend/components/flutter-app-development/DevelopmentSection.vue
index c454d6ecc..8177dba67 100644
--- a/nuxt-frontend/components/flutter-app-development/DevelopmentSection.vue
+++ b/nuxt-frontend/components/flutter-app-development/DevelopmentSection.vue
@@ -59,75 +59,56 @@
-
-
-
-
+
+
+
-
-
-
-
-
+
+
-
-
+
-
-
+
+
+
+
+
@@ -141,13 +122,16 @@ import design from "@/assets/images/flutter-app-development/development/design.w
import development from "@/assets/images/flutter-app-development/development/development.webp";
import deployment from "@/assets/images/flutter-app-development/development/deployment.webp";
import maintainance from "@/assets/images/flutter-app-development/development/maintainance.webp";
+import { elementInViewPort } from "@/utils";
+
export default {
data() {
return {
modules: [Autoplay, Mousewheel, Pagination],
- swiper: null,
- swiperRef: 0,
activeIndex: 0,
+ lastScrollY: 0,
+ prevIndex: 0,
+ height: 0,
items: [
{
title: `Flutter App Development
Consultation`,
@@ -192,46 +176,47 @@ export default {
],
};
},
- mounted() {
- document.addEventListener("scroll", this.handleScroll);
- },
- unmounted() {
- document.removeEventListener("scroll", this.handleScroll);
- },
methods: {
onSlideChange(event) {
this.activeIndex = event.activeIndex;
},
- setSwiperRef(swiper) {
- this.swiperRef = swiper;
- },
- handleScrollTop() {
+ handleScroll() {
+ const scrollY = window.scrollY;
+ const scrollUp = this.lastScrollY > scrollY && window.pageYOffset > 100;
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)
- ) {
- this.swiperRef.mousewheel.enable();
+ const sticky = document.getElementById("sticky");
+
+ const stickyTop = sticky.getBoundingClientRect();
+ const stickyT = stickyParent.getBoundingClientRect().top;
+
+ if (stickyTop.top - stickyT > 0) {
+ sticky.classList.add("overflow-y-scroll");
} else {
- this.swiperRef.mousewheel.disable();
+ sticky.classList.remove("overflow-y-scroll");
}
- this.lastScrollY = scrollTop;
},
},
components: {
Swiper,
SwiperSlide,
},
+ mounted() {
+ this.height = window.innerHeight;
+ window.addEventListener("scroll", this.handleScroll);
+ },
+ unmounted() {
+ window.removeEventListener("scroll", this.handleScroll);
+ },
};