From e9967fa22781d922ba4eb8fb44fe72d200ac4b14 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 10 Nov 2025 21:04:10 +0000
Subject: [PATCH] =IconsManager.php update

---
 src/glossary/view.js |   17 ++---------------
 1 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/src/glossary/view.js b/src/glossary/view.js
index 0d426b1..abe67a6 100644
--- a/src/glossary/view.js
+++ b/src/glossary/view.js
@@ -14,7 +14,6 @@
 		this.navList = this.nav.querySelector('ul');
 		this.activeClass = 'active';
 		this.currentActive = null;
-		this.breakpoint = 768; // Adjust this to match your small screen breakpoint
 
 		this.init();
 		this.setupResizeHandler();
@@ -42,13 +41,6 @@
 	}
 
 	getRootMargin() {
-		if (window.innerWidth < this.breakpoint) {
-			// On small screens: 5rem from top and bottom
-			// Convert rem to pixels
-			const remInPixels = parseFloat(getComputedStyle(document.documentElement).fontSize);
-			const margin = Math.round(remInPixels * 5); // 5rem in pixels
-			return `-${margin}px 0px -${margin}px 0px`;
-		}
 		// On larger screens: centered (50% from top and bottom)
 		return '-50% 0px -50% 0px';
 	}
@@ -94,16 +86,11 @@
 		this.terms.forEach(term => {
 			const rect = term.getBoundingClientRect();
 
-			// Check if term is within the trigger zone (4rem from top or bottom on small screens)
-			const isInZone = window.innerWidth < this.breakpoint
-				? rect.top >= margin && rect.top <= window.innerHeight - margin
-				: rect.top + rect.height / 2 >= 0 && rect.top + rect.height / 2 <= window.innerHeight;
+			const isInZone = rect.top + rect.height / 2 >= 0 && rect.top + rect.height / 2 <= window.innerHeight;
 
 			if (isInZone) {
 				// Find closest to the trigger point
-				const triggerPoint = window.innerWidth < this.breakpoint
-					? margin  // Top edge of zone on small screens
-					: window.innerHeight / 2;  // Center on large screens
+				const triggerPoint = window.innerHeight / 2;
 
 				const distance = Math.abs(rect.top - triggerPoint);
 

--
Gitblit v1.10.0