From 2c6df80c420a408fe014c7d7749b1db64b0d2b60 Mon Sep 17 00:00:00 2001 From: pandamicro Date: Thu, 23 Mar 2017 18:00:22 +0800 Subject: [PATCH] Use containerStyle.margin instead of marginLeft for consistency --- cocos2d/core/platform/CCView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2d/core/platform/CCView.js b/cocos2d/core/platform/CCView.js index 755c884638..c977c328f8 100644 --- a/cocos2d/core/platform/CCView.js +++ b/cocos2d/core/platform/CCView.js @@ -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';