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

Method notifyOnScrollEnd

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

Source from the content-addressed store, hash-verified

334}
335
336void ViewNodeScrollState::notifyOnScrollEnd(const Point& directionAgnosticContentOffset,
337 const Point& directionAgnosticUnclampedContentOffset) {
338 _scrolling = false;
339 if (_onScrollEndCallback != nullptr) {
340 VALDI_TRACE("Valdi.notifyOnScrollEnd")
341 static Point velocity = Point(0, 0);
342 submitScrollEndEvent(_onScrollEndCallback,
343 ValueFunctionFlagsNone,
344 directionAgnosticContentOffset,
345 directionAgnosticUnclampedContentOffset,
346 velocity);
347 }
348}
349
350static Value makeScrollEvent(const Point& directionAgnosticContentOffset,
351 const Point& directionAgnosticUnclampedContentOffset,

Callers 1

onScrollEndMethod · 0.80

Calls 1

PointClass · 0.50

Tested by

no test coverage detected