englercj / phaser-tiled

A tilemap implementation for phaser focusing on large complex maps built with the Tiled Editor.
MIT License
290 stars 31 forks source link

Incorrect Reference in TileLayer.getTiles #17

Closed ryan-graef closed 9 years ago

ryan-graef commented 9 years ago

These lines:

if (width > this.layer.widthInPixels)
{
    width = this.layer.widthInPixels;
}

if (height > this.layer.heightInPixels)
{
    height = this.layer.heightInPixels;
}

are throwing an error because the scope is in the layer. I corrected this by changing it to:

if (width > this.widthInPixels)
{
    width = this.widthInPixels;
}

if (height > this.heightInPixels)
{
    height = this.heightInPixels;
}
englercj commented 9 years ago

Good catch, can you put in a PR?