You are on page 1of 1

var MyContentStg = cc.ContentStrategy.

extend({ preApply: function (view) { // This function is called before the process of adaptation, // you can remove this function if you don't need },

apply: function (view, designedResolution) { var containerW = cc.canvas.width, containerH = cc.canvas.height;

// The process to calculate the content size, the x axe scale and the y axe scale

return this._buildResult(containerW, containerH, contentW, contentH, scaleX, scaleY); },

postApply: function (view) { // This function is called after the process of adaptation, // you can remove this function if you don't need } });

You might also like