MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / init

Method init

Source/Node/AlignNode.cpp:272–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272bool AlignNode::init() {
273 if (!Node::init()) return false;
274 _yogaNode = YGNodeNewWithConfig(getConfig());
275 YGNodeSetContext(_yogaNode, this);
276 if (getWidth() > 0.0f) {
277 YGNodeStyleSetWidth(_yogaNode, getWidth());
278 }
279 if (getHeight() > 0.0f) {
280 YGNodeStyleSetHeight(_yogaNode, getHeight());
281 }
282 return true;
283}
284
285void AlignNode::addChild(Node* child, int order, String tag) {
286 AssertUnless(_yogaNode, "Yoga node is destroyed");

Callers

nothing calls this directly

Calls 6

YGNodeNewWithConfigFunction · 0.85
getConfigFunction · 0.85
YGNodeSetContextFunction · 0.85
YGNodeStyleSetWidthFunction · 0.85
YGNodeStyleSetHeightFunction · 0.85
initFunction · 0.50

Tested by

no test coverage detected