fix scrollCenterColumn

This commit is contained in:
Peter Fajdiga
2023-07-07 11:15:50 +02:00
parent 5c8da41647
commit 68d2c5bbd8

View File

@@ -56,7 +56,7 @@ class ScrollView {
}
scrollCenterColumn(column: Column) {
const windowCenter = this.gridToTilingSpace(column.getRight() / 2 + this.world.config.gapsInnerHorizontal);
const windowCenter = this.gridToTilingSpace(column.getLeft() + column.width / 2 + this.world.config.gapsInnerHorizontal);
const screenCenter = this.tilingArea.x + this.tilingArea.width / 2;
this.adjustScroll(Math.round(windowCenter - screenCenter), false);
}