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

Method getDirectionAgnosticFrame

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

Source from the content-addressed store, hash-verified

1275
1276const Frame& ViewNode::getViewFrame() const {
1277 return _viewFrame;
1278}
1279
1280const Frame& ViewNode::getCalculatedFrame() const {
1281 return _calculatedFrame;
1282}
1283
1284Frame ViewNode::getDirectionAgnosticFrame() const {
1285 auto frame = getCalculatedFrame();
1286
1287 auto parent = getParent();
1288 if (parent != nullptr && parent->isRightToLeft()) {
1289 frame.x = parent->getChildrenSpaceWidth() - frame.getRight();

Callers 3

TESTFunction · 0.80

Calls 3

getChildrenSpaceWidthMethod · 0.80
getRightMethod · 0.80
isRightToLeftMethod · 0.45

Tested by 1

TESTFunction · 0.64