MCPcopy Create free account
hub / github.com/Snapchat/Valdi / makeDragEvent

Method makeDragEvent

valdi_core/src/valdi_core/cpp/Events/TouchEvents.cpp:81–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81Value TouchEvents::makeDragEvent(Valdi::TouchEventState state,
82 double x,
83 double y,
84 double absoluteX,
85 double absoluteY,
86 double deltaX,
87 double deltaY,
88 double velocityX,
89 double velocityY,
90 int pointerCount,
91 TouchEvents::PointerLocations& pointerLocations) {
92 static auto deltaXKey = STRING_LITERAL("deltaX");
93 static auto deltaYKey = STRING_LITERAL("deltaY");
94
95 auto map = makeShared<ValueMap>();
96 fillEvent(*map, state, x, y, absoluteX, absoluteY);
97 fillVelocity(*map, velocityX, velocityY);
98 fillPointerData(*map, pointerCount, pointerLocations);
99 (*map)[deltaXKey] = Value(deltaX);
100 (*map)[deltaYKey] = Value(deltaY);
101
102 return Value(map);
103}
104
105Value TouchEvents::makePinchEvent(Valdi::TouchEventState state,
106 double x,

Callers

nothing calls this directly

Calls 4

fillEventFunction · 0.85
fillVelocityFunction · 0.85
fillPointerDataFunction · 0.85
ValueClass · 0.50

Tested by

no test coverage detected