Merge pull request #2115 from knoxHuang/fix_bug

fix tilemap layer is empty error
This commit is contained in:
pandamicro
2017-11-17 12:07:41 +08:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ proto.rendering = function (ctx, scaleX, scaleY) {
tiles = node.tiles,
alpha = node._opacity / 255;
if (!tiles || alpha <= 0) {
if (!tiles || alpha <= 0 || !node.tileset) {
return;
}
+3 -2
View File
@@ -72,9 +72,10 @@ proto.uploadData = function (f32buffer, ui32buffer, vertexDataOffset) {
var node = this._node,
layerOrientation = node.layerOrientation,
tiles = node.tiles;
tiles = node.tiles,
alpha = node._opacity / 255;
if (!tiles) {
if (!tiles || alpha <= 0 || !node.tileset) {
return 0;
}