We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41396d5 commit 510353fCopy full SHA for 510353f
1 file changed
src/tilemap/Tileset.js
@@ -214,8 +214,8 @@ Phaser.Tileset.prototype = {
214
updateTileData: function (imageWidth, imageHeight) {
215
216
// May be fractional values
217
- var rowCount = (imageHeight - this.tileMargin) / (this.tileHeight + this.tileSpacing);
218
- var colCount = (imageWidth - this.tileMargin) / (this.tileWidth + this.tileSpacing);
+ var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing);
+ var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing);
219
220
if (rowCount % 1 !== 0 || colCount % 1 !== 0)
221
{
0 commit comments