mirror of
https://github.com/teoxoy/factorio-blueprint-editor.git
synced 2025-02-05 13:05:07 +02:00
fixed export entity positions (should fix #6)
This commit is contained in:
parent
8776b64a08
commit
b638df3e5d
@ -356,8 +356,8 @@ export class Blueprint {
|
|||||||
|
|
||||||
center() {
|
center() {
|
||||||
return {
|
return {
|
||||||
x: (this.topLeft().x + this.topRight().x) / 2,
|
x: Math.floor((this.topLeft().x + this.topRight().x) / 2) + 0.5,
|
||||||
y: (this.topLeft().y + this.bottomLeft().y) / 2
|
y: Math.floor((this.topLeft().y + this.bottomLeft().y) / 2) + 0.5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
topLeft() { return this.getPosition('topLeft', Math.min, Math.min) }
|
topLeft() { return this.getPosition('topLeft', Math.min, Math.min) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user