a tool for shared writing and social publishing
at c19d446e205b2accecd8f4bb177c3fead2b5a511 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}