MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / mouse

Function mouse

atomic-cli/tests/fixtures/graph_canvas_test.js:54–56  ·  view source on GitHub ↗
(target, type, x, y)

Source from the content-addressed store, hash-verified

52 assert(other, 'fixture must have multiple selectable nodes');
53 function selectOther() { picker.value = other.value; picker.dispatchEvent(new Event('change')); }
54 function mouse(target, type, x, y) {
55 target.dispatchEvent(new MouseEvent(type, {clientX: x, clientY: y, bubbles: true, view: window, button: 0}));
56 }
57 selectOther();
58 mouse(canvas, 'mousedown', point[0], point[1]);
59 mouse(window, 'mouseup', point[0], point[1]);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected