| 147 | _activeLayout = bActive; |
| 148 | } |
| 149 | void Helper::doLayout(ax::Node* rootNode) |
| 150 | { |
| 151 | if (!_activeLayout) |
| 152 | { |
| 153 | return; |
| 154 | } |
| 155 | |
| 156 | for (auto&& node : rootNode->getChildren()) |
| 157 | { |
| 158 | auto com = node->getComponent(__LAYOUT_COMPONENT_NAME); |
| 159 | Node* parent = node->getParent(); |
| 160 | if (nullptr != com && nullptr != parent) |
| 161 | { |
| 162 | LayoutComponent* layoutComponent = (LayoutComponent*)com; |
| 163 | |
| 164 | layoutComponent->refreshLayout(); |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | Rect Helper::restrictCapInsetRect(const ax::Rect& capInsets, const Vec2& textureSize) |
| 170 | { |
no test coverage detected