| 225 | return _positionPercentX; |
| 226 | } |
| 227 | void LayoutComponent::setPositionPercentX(float percentMargin) |
| 228 | { |
| 229 | _positionPercentX = percentMargin; |
| 230 | |
| 231 | if (_usingPositionPercentX || _horizontalEdge == HorizontalEdge::Center) |
| 232 | { |
| 233 | Node* parent = this->getOwnerParent(); |
| 234 | if (parent != nullptr) |
| 235 | { |
| 236 | _owner->setPositionX(parent->getContentSize().width * _positionPercentX); |
| 237 | this->refreshHorizontalMargin(); |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | bool LayoutComponent::isPositionPercentYEnabled() const |
| 243 | { |
no test coverage detected