Use containerStyle.margin instead of marginLeft for consistency

This commit is contained in:
pandamicro
2017-03-23 18:00:22 +08:00
parent d7a8c424e1
commit 2c6df80c42
+2 -2
View File
@@ -1171,7 +1171,7 @@ cc.ContentStrategy = cc._Class.extend(/** @lends cc.ContentStrategy# */{
this._setupContainer(view, view._frameSize.width, view._frameSize.height);
// Setup container's margin and padding
if (view._isRotated) {
containerStyle.marginLeft = frameH + 'px';
containerStyle.margin = '0 0 0 ' + frameH + 'px';
}
else {
containerStyle.margin = '0px';
@@ -1202,7 +1202,7 @@ cc.ContentStrategy = cc._Class.extend(/** @lends cc.ContentStrategy# */{
if (!CC_EDITOR) {
// Setup container's margin and padding
if (view._isRotated) {
containerStyle.marginLeft = frameH + 'px';
containerStyle.margin = '0 0 0 ' + frameH + 'px';
}
else {
containerStyle.margin = '0px';