MCPcopy Create free account
hub / github.com/error311/FileRise / scheduleSectionFocus

Function scheduleSectionFocus

public/js/adminPanel.js:5674–5692  ·  view source on GitHub ↗
(hdr, cnt)

Source from the content-addressed store, hash-verified

5672}
5673
5674function scheduleSectionFocus(hdr, cnt) {
5675 if (!hdr || !cnt) return;
5676 clearSectionTimer(cnt);
5677 const focusNow = () => {
5678 if (cnt.style.display === "none") return;
5679 focusSectionIntoView(hdr, cnt);
5680 };
5681 requestAnimationFrame(() => {
5682 requestAnimationFrame(() => {
5683 focusNow();
5684 cnt.__focusTimer = setTimeout(() => {
5685 if (cnt.classList.contains("is-open") && cnt.style.display !== "none") {
5686 focusSectionIntoView(hdr, cnt);
5687 }
5688 cnt.__focusTimer = null;
5689 }, SECTION_ANIM_MS + 40);
5690 });
5691 });
5692}
5693
5694function toggleSection(id) {
5695 const hdr = document.getElementById(id + "Header");

Callers 1

toggleSectionFunction · 0.85

Calls 3

clearSectionTimerFunction · 0.85
focusNowFunction · 0.85
focusSectionIntoViewFunction · 0.85

Tested by

no test coverage detected