1
0
mirror of https://github.com/teoxoy/factorio-blueprint-editor.git synced 2025-01-18 02:58:31 +02:00

fixed export entity positions (should fix #6)

This commit is contained in:
Teoxoy 2018-09-29 18:33:27 +02:00
parent 8776b64a08
commit b638df3e5d

View File

@ -356,8 +356,8 @@ export class Blueprint {
center() {
return {
x: (this.topLeft().x + this.topRight().x) / 2,
y: (this.topLeft().y + this.bottomLeft().y) / 2
x: Math.floor((this.topLeft().x + this.topRight().x) / 2) + 0.5,
y: Math.floor((this.topLeft().y + this.bottomLeft().y) / 2) + 0.5
}
}
topLeft() { return this.getPosition('topLeft', Math.min, Math.min) }