| 270 | } |
| 271 | |
| 272 | bool 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 | |
| 285 | void AlignNode::addChild(Node* child, int order, String tag) { |
| 286 | AssertUnless(_yogaNode, "Yoga node is destroyed"); |
nothing calls this directly
no test coverage detected