Fixed TilemapParser - would spit out a tileset warning if margin/spacing were set (fix #485, thanks Cybolic)

This commit is contained in:
photonstorm
2014-02-26 01:20:24 +00:00
parent 994eaff92b
commit 29fcfc515d
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -164,6 +164,7 @@ Bug Fixes:
* Swapping between tabs will pause and resume tweens correctly, allowing their onComplete events to still fire (fixes #292)
* Fullscreen mode now uses window.outerWidth/Height when using EXACT_FIT as the scale mode, which fixes input coordinate errors (fixes #232)
* Fullscreen mode now works in Internet Explorer and uses the new fullscreen non-prefix call.
* Fixed TilemapParser - would spit out a tileset warning if margin/spacing were set (fix #485, thanks Cybolic)
TO DO:
+2 -2
View File
@@ -396,8 +396,8 @@ Phaser.TilemapParser = {
newSet.tileProperties = set.tileproperties;
}
newSet.rows = (set.imageheight - set.margin) / (set.tileheight + set.spacing);
newSet.columns = (set.imagewidth - set.margin) / (set.tilewidth + set.spacing);
newSet.rows = Math.round((set.imageheight - set.margin) / (set.tileheight + set.spacing));
newSet.columns = Math.round((set.imagewidth - set.margin) / (set.tilewidth + set.spacing));
newSet.total = newSet.rows * newSet.columns;
if (newSet.rows % 1 !== 0 || newSet.columns % 1 !== 0)