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

Method resolveFlexGrow

third-party/yoga/src/yoga/node/Node.cpp:426–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426float Node::resolveFlexGrow() const {
427 // Root nodes flexGrow should always be 0
428 if (owner_ == nullptr) {
429 return 0.0;
430 }
431 if (style_.flexGrow().isDefined()) {
432 return style_.flexGrow().unwrap();
433 }
434 if (style_.flex().isDefined() && style_.flex().unwrap() > 0.0f) {
435 return style_.flex().unwrap();
436 }
437 return Style::DefaultFlexGrow;
438}
439
440float Node::resolveFlexShrink() const {
441 if (owner_ == nullptr) {

Callers 5

calculateLayoutImplFunction · 0.80
calculateFlexLineFunction · 0.80

Calls 2

isDefinedMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected