Skip to content

Commit fcd6757

Browse files
committed
Fixed cocos2d#2416: add a condition to TMXLayer
1 parent f964da8 commit fcd6757

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cocos2d/tilemap/CCTMXLayer.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ cc.TMXLayer = cc.SpriteBatchNode.extend(/** @lends cc.TMXLayer# */{
354354
tile.anchorX = 0;
355355
tile.anchorY = 0;
356356
tile.opacity = this._opacity;
357-
tile._renderCmd._cachedParent = this._renderCmd;
357+
if(cc._renderType === cc._RENDER_TYPE_CANVAS) //todo need refactor
358+
tile._renderCmd._cachedParent = this._renderCmd;
358359

359360
var indexForZ = this._atlasIndexForExistantZ(z);
360361
this.addSpriteWithoutQuad(tile, indexForZ, z);

0 commit comments

Comments
 (0)