Skip to content

Commit b8cfc26

Browse files
committed
Issue cocos2d#2416: Change function name
1 parent 853f40b commit b8cfc26

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cocos2d/tilemap/CCTMXLayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ cc.TMXLayer = cc.SpriteBatchNode.extend(/** @lends cc.TMXLayer# */{
117117
*/
118118
setContentSize:function (size, height) {
119119
cc.Node.prototype.setContentSize.call(this, size, height);
120-
this._renderCmd.setContentSize(size, height);
120+
this._renderCmd._updateCacheContext(size, height);
121121
},
122122

123123
/**

cocos2d/tilemap/CCTMXLayerRenderCmd.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@
109109
cc.g_NumberOfDraws++;
110110
};
111111

112-
proto.setContentSize = function(size, height){
113-
var node = this._node;
114-
var locContentSize = node._contentSize;
115-
var locCanvas = this._cacheCanvas;
116-
var scaleFactor = cc.contentScaleFactor();
112+
proto._updateCacheContext = function(size, height){
113+
var node = this._node,
114+
locContentSize = node._contentSize,
115+
locCanvas = this._cacheCanvas,
116+
scaleFactor = cc.contentScaleFactor();
117117
locCanvas.width = 0 | (locContentSize.width * 1.5 * scaleFactor);
118118
locCanvas.height = 0 | (locContentSize.height * 1.5 * scaleFactor);
119119

@@ -248,7 +248,7 @@
248248
var proto = cc.TMXLayer.WebGLRenderCmd.prototype.rendering = cc.SpriteBatchNode.WebGLRenderCmd.prototype.rendering;
249249
proto.constructor = cc.TMXLayer.WebGLRenderCmd;
250250

251-
proto.setContentSize = function(){};
251+
proto._updateCacheContext = function(){};
252252

253253
proto.getTexture = cc.SpriteBatchNode.prototype.getTexture;
254254

0 commit comments

Comments
 (0)