ParseTiledJSON eslint auto fix

This commit is contained in:
Michael Hadley 2017-11-10 17:13:11 -06:00
parent f9f6d95097
commit 1ba75cd50c

View file

@ -1,7 +1,7 @@
var Formats = require('../Formats');
var Tileset = require('../Tileset');
var Tile = require('../Tile');
var Extend = require("../../../utils/object/Extend");
var Extend = require('../../../utils/object/Extend');
var ParseJSONTiled = function (key, json)
{
@ -310,7 +310,8 @@ var ParseJSONTiled = function (key, json)
var objects = {};
var collision = {};
function slice (obj, fields) {
function slice (obj, fields)
{
var sliced = {};
@ -348,7 +349,7 @@ var ParseJSONTiled = function (key, json)
gid: curo.objects[v].gid,
name: curo.objects[v].name,
type: curo.objects[v].hasOwnProperty("type") ? curo.objects[v].type : "",
type: curo.objects[v].hasOwnProperty('type') ? curo.objects[v].type : '',
x: curo.objects[v].x,
y: curo.objects[v].y,
visible: curo.objects[v].visible,
@ -394,6 +395,7 @@ var ParseJSONTiled = function (key, json)
collision[curo.name].push(object);
objects[curo.name].push(object);
}
// polygon
else if (curo.objects[v].polygon)
{
@ -410,12 +412,14 @@ var ParseJSONTiled = function (key, json)
objects[curo.name].push(object);
}
// ellipse
else if (curo.objects[v].ellipse)
{
var object = slice(curo.objects[v], [ 'name', 'type', 'ellipse', 'x', 'y', 'width', 'height', 'visible', 'rotation', 'properties' ]);
objects[curo.name].push(object);
}
// otherwise it's a rectangle
else
{