ScrollView: refactor scrollCenterColumn
This commit is contained in:
@@ -67,8 +67,8 @@ class ScrollView {
|
||||
}
|
||||
|
||||
scrollCenterColumn(column: Column) {
|
||||
const windowCenter = this.gridToTilingSpace(column.getLeft() + column.width / 2 + this.world.config.gapsInnerHorizontal);
|
||||
const screenCenter = this.tilingArea.x + this.tilingArea.width / 2;
|
||||
const windowCenter = column.getLeft() + column.width / 2;
|
||||
const screenCenter = this.scrollX + this.tilingArea.width / 2;
|
||||
this.adjustScroll(Math.round(windowCenter - screenCenter), false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user