MCPcopy
hub / github.com/palantir/plottable / makePointerCallback

Function makePointerCallback

test/interactions/pointerInteractionTests.ts:26–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 };
25
26 function makePointerCallback() {
27 const callback = <PointerTestCallback> function(p?: Plottable.Point) {
28 callback.lastPoint = p;
29 callback.called = true;
30 };
31 callback.called = false;
32 callback.reset = () => {
33 callback.lastPoint = undefined;
34 callback.called = false;
35 };
36 return callback;
37 }
38
39 function triggerPointerEvent(p: Plottable.Point, mode: TestMethods.InteractionMode, target: SimpleSelection<void>) {
40 const type = mode === TestMethods.InteractionMode.Mouse ? TestMethods.InteractionType.Move : TestMethods.InteractionType.Start;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected