MCPcopy
hub / github.com/hmjz100/LinkSwift / handleMove

Function handleMove

(改)网盘直链下载助手.user.js:3196–3211  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

3194
3195 // 事件处理
3196 var handleMove = (e) => {
3197 if (!currentTarget) return;
3198
3199 // 获取坐标,PointerEvent 统一了 clientX/Y
3200 var x = e.pageX;
3201 var y = e.pageY;
3202
3203 if (!ticking) {
3204 // 使用 requestAnimationFrame 节流,确保每帧只更新一次位置
3205 requestAnimationFrame(() => {
3206 updatePosition(x, y);
3207 ticking = false;
3208 });
3209 ticking = true;
3210 }
3211 };
3212
3213 var handleOver = (e) => {
3214 var target = e.target.closest(".listener-tip");

Callers

nothing calls this directly

Calls 1

updatePositionFunction · 0.85

Tested by

no test coverage detected