Grid: make internal methods private

This commit is contained in:
Peter Fajdiga
2023-06-08 09:29:46 +02:00
parent 0cf395d2e1
commit 4bdc031d7b

View File

@@ -142,7 +142,7 @@ class Grid {
this.scrollToColumn(column); this.scrollToColumn(column);
} }
setScroll(x: number, force: boolean) { private setScroll(x: number, force: boolean) {
if (!force) { if (!force) {
let minScroll = 0; let minScroll = 0;
let maxScroll = this.width - this.tilingArea.width; let maxScroll = this.width - this.tilingArea.width;
@@ -160,11 +160,11 @@ class Grid {
this.setScroll(this.scrollX + dx, force); this.setScroll(this.scrollX + dx, force);
} }
removeOverscroll() { private removeOverscroll() {
this.setScroll(this.scrollX, false); this.setScroll(this.scrollX, false);
} }
columnsSetX(firstMovedColumn: Column|null) { private columnsSetX(firstMovedColumn: Column|null) {
const lastUnmovedColumn = firstMovedColumn === null ? this.columns.getLast() : this.columns.getPrev(firstMovedColumn); const lastUnmovedColumn = firstMovedColumn === null ? this.columns.getLast() : this.columns.getPrev(firstMovedColumn);
let x = lastUnmovedColumn === null ? 0 : lastUnmovedColumn.gridX + lastUnmovedColumn.width + this.world.config.gapsInnerHorizontal; let x = lastUnmovedColumn === null ? 0 : lastUnmovedColumn.gridX + lastUnmovedColumn.width + this.world.config.gapsInnerHorizontal;
if (firstMovedColumn !== null) { if (firstMovedColumn !== null) {