closed #5118, fix CCSGUIReader setAnchorPoint

This commit is contained in:
andyque 2014-05-12 18:07:13 +08:00
parent a0a4df5ac5
commit ebffc66a83
1 changed files with 4 additions and 1 deletions

View File

@ -1265,7 +1265,10 @@ void WidgetPropertiesReader0300::setColorPropsForWidgetFromJsonDictionary(Widget
apyf = widget->getAnchorPoint().y;
}
widget->setAnchorPoint(Vector2(apxf, apyf));
if (apx || apy) {
widget->setAnchorPoint(Vector2(apxf, apyf));
}
bool flipX = DICTOOL->getBooleanValue_json(options, "flipX");
bool flipY = DICTOOL->getBooleanValue_json(options, "flipY");
widget->setFlippedX(flipX);