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

Function ygMeasureYoga

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

Source from the content-addressed store, hash-verified

3701 newDirection = facebook::yoga::FlexDirection::Column;
3702 }
3703
3704 if (getYogaStyle(getYogaNodeForInsertingChildren()).flexDirection() != newDirection) {
3705 getYogaStyle(getYogaNodeForInsertingChildren()).setFlexDirection(newDirection);
3706 markLayoutDirty();
3707 }
3708
3709 auto& scrollState = getOrCreateScrollState();
3710 if (scrollState.getIsHorizontal() != horizontalScroll) {
3711 scrollState.setIsHorizontal(horizontalScroll);
3712 scrollState.setNeedsSyncWithView(true);
3713 }
3714}
3715
3716void ViewNode::setScrollCircularRatio(int circularRatio) {
3717 auto& scrollState = getOrCreateScrollState();
3718 if (scrollState.getCircularRatio() != circularRatio) {
3719 scrollState.setCircularRatio(circularRatio);
3720 scrollState.setNeedsSyncWithView(true);
3721 }
3722}
3723
3724void ViewNode::setScrollStaticContentWidth(float staticContentWidth) {
3725 auto& scrollState = getOrCreateScrollState();
3726 if (scrollState.getStaticContentWidth() != staticContentWidth) {

Callers

nothing calls this directly

Calls 6

sanitizeMeasurementFunction · 0.85
resolveRefFunction · 0.50
getContextMethod · 0.45
onMeasureMethod · 0.45
getPointScaleMethod · 0.45

Tested by

no test coverage detected