1
2
3
4
5
| const positions = new Map<string, number>();
| const cached = new Set(['/mobile/bags', '/mobile/pallets', '/mobile/batches', '/mobile/stock']);
| export function saveMobileScroll(path: string) { if (cached.has(path)) positions.set(path, window.scrollY); }
| export function mobileScroll(path: string) { const top=positions.get(path);return top==null?undefined:{left:0,top}; }
| export function clearMobileScroll() { positions.clear(); }
|
|