I guess I didn't test before that last commit

This commit is contained in:
Gavin McDonald
2018-07-17 21:04:53 -04:00
parent 57ada13a8d
commit e4b9b87f44
6 changed files with 8 additions and 12 deletions

View File

@@ -50,7 +50,7 @@ export default class CartographerPointyXY extends Cartographer {
}
tileToPixel(square) {
square = typeof square === 'Square' ? square : new Square(...arguments);
square = square instanceof Square ? square : new Square(...arguments);
const x = square.getX();
const y = square.getY();
@@ -63,7 +63,7 @@ export default class CartographerPointyXY extends Cartographer {
}
pixelToTile(point) {
point = typeof point === 'Point' ? point : new Point(x, y);
point = point instanceof Point ? point : new Point(...arguments);
const pixelX = point.getX() - this.originX;
const pixelY = this.originY - point.getY();