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

Method populateViewStats

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

Source from the content-addressed store, hash-verified

3111 childrenViewOffsetY = viewOffsetY + _calculatedFrame.y;
3112 } else if (!hasParent()) {
3113 // If we are the root, we use the calculated x,y as the initial offset
3114 // since the root view frame is fixed in platform. If our flexbox calculation
3115 // had a non zero x or y for the root node, we wouldn't be able to apply it to
3116 // the backing view, but we can at least offset the children so that they appear
3117 // at the right position. This allows the use of the margin attributes on root nodes.
3118 childrenViewOffsetX = _calculatedFrame.x;
3119 childrenViewOffsetY = _calculatedFrame.y;
3120 }
3121
3122 float childrenRtlOffsetX = isInScrollMode() ? getOrCreateScrollState().getRtlOffsetX() : 0.0f;
3123 const auto& resolvedAnimator = resolveAnimator(parentAnimator);
3124
3125 if (_onLayoutCompletedCallback != nullptr && frameObserver != nullptr) {
3126 frameObserver->appendCompleteCallback(_onLayoutCompletedCallback);

Callers

nothing calls this directly

Calls 2

addViewClassMethod · 0.80
addLayoutMethod · 0.80

Tested by

no test coverage detected