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

Method notifyOnDragEnd

valdi/src/valdi/runtime/Context/ViewNodeScrollState.cpp:361–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359 static_cast<double>(directionAgnosticVelocity.x),
360 static_cast<double>(directionAgnosticVelocity.y));
361}
362
363void ViewNodeScrollState::notifyOnDragEnd(const Point& directionAgnosticContentOffset,
364 const Point& directionAgnosticUnclampedContentOffset,
365 const Point& directionAgnosticVelocity) const {
366 if (_onDragEndCallback == nullptr) {
367 return;
368 }
369
370 VALDI_TRACE("Valdi.notifyOnDragEnd");
371 auto scrollEvent = makeScrollEvent(
372 directionAgnosticContentOffset, directionAgnosticUnclampedContentOffset, directionAgnosticVelocity);
373 _onDragEndCallback->call(ValueFunctionFlagsBoundedMainThreadSync, &scrollEvent, 1);
374}
375

Callers 1

onDragEndingMethod · 0.80

Calls 2

makeScrollEventFunction · 0.85
callMethod · 0.65

Tested by

no test coverage detected