File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ cc.TMXLayer = cc.SpriteBatchNode.extend(/** @lends cc.TMXLayer# */{
117
117
*/
118
118
setContentSize :function ( size , height ) {
119
119
cc . Node . prototype . setContentSize . call ( this , size , height ) ;
120
- this . _renderCmd . setContentSize ( size , height ) ;
120
+ this . _renderCmd . _updateCacheContext ( size , height ) ;
121
121
} ,
122
122
123
123
/**
Original file line number Diff line number Diff line change 109
109
cc . g_NumberOfDraws ++ ;
110
110
} ;
111
111
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 ( ) ;
117
117
locCanvas . width = 0 | ( locContentSize . width * 1.5 * scaleFactor ) ;
118
118
locCanvas . height = 0 | ( locContentSize . height * 1.5 * scaleFactor ) ;
119
119
248
248
var proto = cc . TMXLayer . WebGLRenderCmd . prototype . rendering = cc . SpriteBatchNode . WebGLRenderCmd . prototype . rendering ;
249
249
proto . constructor = cc . TMXLayer . WebGLRenderCmd ;
250
250
251
- proto . setContentSize = function ( ) { } ;
251
+ proto . _updateCacheContext = function ( ) { } ;
252
252
253
253
proto . getTexture = cc . SpriteBatchNode . prototype . getTexture ;
254
254
You can’t perform that action at this time.
0 commit comments