| 1061 | } |
| 1062 | |
| 1063 | Vec2 Layout::getWorldCenterPoint(Widget* widget) const |
| 1064 | { |
| 1065 | Layout* layout = dynamic_cast<Layout*>(widget); |
| 1066 | // FIXEDME: we don't need to calculate the content size of layout anymore |
| 1067 | Vec2 widgetSize = layout ? layout->getLayoutAccumulatedSize() : widget->getContentSize(); |
| 1068 | // AXLOGD("content size : width = {}, height = {}", widgetSize.width, widgetSize.height); |
| 1069 | return widget->convertToWorldSpace(Vec2(widgetSize.width / 2, widgetSize.height / 2)); |
| 1070 | } |
| 1071 | |
| 1072 | float Layout::calculateNearestDistance(Widget* baseWidget) |
| 1073 | { |
no test coverage detected