a tool for shared writing and social publishing
at d30f8e8d8a4d68d80b09c6b2a6787f74bcb99b4e 10 lines 299 B view raw
1import { scrollIntoViewIfNeeded } from "./scrollIntoViewIfNeeded"; 2 3export function scrollIntoView( 4 elementId: string, 5 scrollContainerId: string = "pages", 6 threshold: number = 0.9, 7) { 8 const element = document.getElementById(elementId); 9 scrollIntoViewIfNeeded(element, false, "smooth"); 10}