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

Function bindDragAutoScroll

public/js/main.js:768–780  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

766
767
768function bindDragAutoScroll() {
769 if (window.__FR_FLAGS.wired.dragScroll) return;
770 window.__FR_FLAGS.wired.dragScroll = true;
771
772 const THRESH = 50;
773 const SPEED = 20;
774 document.addEventListener('dragover', (e) => {
775 const y = e && typeof e.clientY === 'number' ? e.clientY : null;
776 if (y == null) return;
777 if (y < THRESH) window.scrollBy(0, -SPEED);
778 else if (y > (window.innerHeight - THRESH)) window.scrollBy(0, SPEED);
779 }, { passive: true });
780}
781
782function bindClickIfMissing(id, fnName) {
783 const el = document.getElementById(id);

Callers 1

bootHeavyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected