Grid.increaseColumnWidth: fix scroll adjustment after resize
This commit is contained in:
@@ -123,7 +123,7 @@ class Desktop {
|
||||
return clamp(x, minScroll, maxScroll);
|
||||
}
|
||||
|
||||
private setScroll(x: number, force: boolean) {
|
||||
public setScroll(x: number, force: boolean) {
|
||||
const oldScrollX = this.scrollX;
|
||||
this.scrollX = force ? x : this.clampScrollX(x);
|
||||
if (this.scrollX !== oldScrollX) {
|
||||
|
||||
@@ -175,10 +175,10 @@ class Grid {
|
||||
const rightVisibleWidth = rightColumn === null ? Infinity : visibleRange.getRight() - rightColumn.getLeft();
|
||||
const expandLeft = leftVisibleWidth < rightVisibleWidth;
|
||||
const widthDelta = (expandLeft ? leftVisibleWidth : rightVisibleWidth) + this.config.gapsInnerHorizontal;
|
||||
if (expandLeft) {
|
||||
this.desktop.adjustScroll(widthDelta, false);
|
||||
}
|
||||
column.adjustWidth(widthDelta, true);
|
||||
if (expandLeft) {
|
||||
this.desktop.setScroll(column.gridX, false);
|
||||
}
|
||||
}
|
||||
|
||||
public decreaseColumnWidth(column: Column) {
|
||||
|
||||
Reference in New Issue
Block a user