UNPKG

@event-calendar/core

Version:

Full-sized drag & drop event calendar with resource & timeline views

17 lines (14 loc) 329 B
import {min, max} from '#lib'; let busy = false; export function animate(fn) { if (!busy) { busy = true; window.requestAnimationFrame(() => { fn(); busy = false; }); } } export function limit(value, minLimit, maxLimit) { return max(minLimit, min(maxLimit, value)); }