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

Method setVisibleInViewport

valdi/src/valdi/runtime/Context/ViewNode.cpp:1220–1233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1218
1219 auto& scrollState = getOrCreateScrollState();
1220
1221 auto directionAgnosticVelocity =
1222 directionAgnosticVelocityFromDirectionDependentVelocity(directionDependentVelocity);
1223
1224 auto directionAgnosticContentOffset =
1225 scrollState.resolveDirectionAgnosticContentOffset(directionDependentContentOffset);
1226 auto directionAgnosticUnclampedContentOffset =
1227 scrollState.resolveDirectionAgnosticContentOffset(directionDependentUnclampedContentOffset);
1228
1229 scrollState.notifyOnDragStart(
1230 directionAgnosticContentOffset, directionAgnosticUnclampedContentOffset, directionAgnosticVelocity);
1231}
1232
1233std::optional<Point> ViewNode::onDragEnding(const Point& directionDependentContentOffset,
1234 const Point& directionDependentUnclampedContentOffset,
1235 const Point& directionDependentVelocity) {
1236 if (isUpdatingScrollSpecs()) {

Callers 2

TESTFunction · 0.80

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.64