MCPcopy
hub / github.com/tldraw/tldraw / pointerDownOnHandle

Method pointerDownOnHandle

packages/tldraw/src/test/TestEditor.ts:375–383  ·  view source on GitHub ↗

* Move to a named selection handle and pointerDown there. The chained equivalent of * `pointerDown(x, y, { target: 'selection', handle })` but using a real canvas event * that exercises the overlay hit-test path. Requires `defaultHandleOverlays`.

(
		handle: string,
		modifiers?: Partial<{ ctrlKey: boolean; shiftKey: boolean; altKey: boolean }>
	)

Source from the content-addressed store, hash-verified

373 * that exercises the overlay hit-test path. Requires `defaultHandleOverlays`.
374 */
375 pointerDownOnHandle(
376 handle: string,
377 modifiers?: Partial<{ ctrlKey: boolean; shiftKey: boolean; altKey: boolean }>
378 ): this {
379 const p = this.getSelectionHandlePagePoint(handle)
380 this.pointerMove(p.x, p.y)
381 this.pointerDown(p.x, p.y, undefined, modifiers)
382 return this
383 }
384
385 /**
386 * Move the pointer by the given delta from its current page position.

Calls 3

pointerMoveMethod · 0.95
pointerDownMethod · 0.95

Tested by

no test coverage detected