Adjust rootMargin values in index.js

The rootMargin values in the index.js file have been tweaked for improved element visibility. Changes are made to sections using a 20% and 30% rootMargin, which are now adjusted to 10% and 20% respectively. These adjustments are expected to improve the overlap triggering user interface components.
This commit is contained in:
2024-03-17 11:54:33 +01:00
parent 28bb5de3c9
commit abf8a943f2
+2 -2
View File
@@ -11,7 +11,7 @@ const observer = new IntersectionObserver((entries) => {
}); });
}, { }, {
root: null, root: null,
rootMargin: '-20% 0px -20% 0px', rootMargin: '-10% 0px -10% 0px',
threshold: 0.3 threshold: 0.3
}); });
@@ -25,7 +25,7 @@ const mobileObserver = new IntersectionObserver((entries) => {
}); });
}, { }, {
root: null, root: null,
rootMargin: '-30% 0px -30% 0px', rootMargin: '-20% 0px -20% 0px',
threshold: 0.1 threshold: 0.1
}); });