diff --git a/cocos2d/core/platform/CCEGLView.js b/cocos2d/core/platform/CCEGLView.js index 5c4db5793b..6cf63b6e60 100644 --- a/cocos2d/core/platform/CCEGLView.js +++ b/cocos2d/core/platform/CCEGLView.js @@ -1035,7 +1035,15 @@ cc.ContentStrategy = cc.Class.extend(/** @lends cc.ContentStrategy# */{ */ var EqualToFrame = cc.ContainerStrategy.extend({ apply: function (view) { + var frameH = view._frameSize.height, containerStyle = cc.container.style; this._setupContainer(view, view._frameSize.width, view._frameSize.height); + // Setup container's margin and padding + if (view._isRotated) { + containerStyle.marginLeft = frameH + 'px'; + } + else { + containerStyle.margin = '0px'; + } } });