From abf8a943f2e5b8608b7bddd6f2b37b3ac02ecfd7 Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Sun, 17 Mar 2024 11:54:33 +0100 Subject: [PATCH] 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. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 1db0de7..25739ae 100644 --- a/index.js +++ b/index.js @@ -11,7 +11,7 @@ const observer = new IntersectionObserver((entries) => { }); }, { root: null, - rootMargin: '-20% 0px -20% 0px', + rootMargin: '-10% 0px -10% 0px', threshold: 0.3 }); @@ -25,7 +25,7 @@ const mobileObserver = new IntersectionObserver((entries) => { }); }, { root: null, - rootMargin: '-30% 0px -30% 0px', + rootMargin: '-20% 0px -20% 0px', threshold: 0.1 });