MCPcopy Create free account
hub / github.com/WhiteSevs/TamperMonkeyScript / drag

Function drag

lib/pops/src/handler/PopsInstHandler.ts:398–575  ·  view source on GitHub ↗

* 拖拽元素 * 说明: * + 元素的position为absolute或者fixed * + 会为元素的 * @param $move 需要拖拽的元素 * @param options 配置

(
    $move: HTMLElement,
    options: {
      dragElement: HTMLElement;
      limit: boolean;
      emitClick?: boolean;
      extraDistance: number;
      container?: Window | typeof globalThis | HTMLElement;
      startCallBack?: (moveElement: HTMLElement, left: number, top: number) => void;
      moveCallBack?: (moveElement: HTMLElement, left: number, top: number) => void;
      endCallBack?: (moveElement: HTMLElement, left: number, top: number) => void;
      preventEvent?: (event: TouchEvent | PointerEvent) => boolean;
    }
  )

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 11

changeMoveElementStyleFunction · 0.85
getContainerTopOrLeftFunction · 0.85
forEachMethod · 0.80
emitMethod · 0.65
assignMethod · 0.45
cssMethod · 0.45
getTransformMethod · 0.45
onMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected