Skip to content

Commit

Permalink
fix: 有冻结行且有垂直scrollWidth时冻结航无法resize
Browse files Browse the repository at this point in the history
  • Loading branch information
owen.wjh committed Jul 21, 2022
1 parent ea5c1f3 commit 3c8f18d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/s2-core/src/cell/table-col-cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,28 @@ export class TableColCell extends ColCell {
this.spreadsheet.dataSet.getFieldName(this.meta.label),
);
}

protected shouldAddVerticalResizeArea() {
if (this.isFrozenCell()) return true
else return super.shouldAddVerticalResizeArea()
}

protected getVerticalResizeAreaOffset() {
const { x, y } = this.meta;
const { scrollX, position } = this.headerConfig;

if (this.isFrozenCell()) {
return {
x,
y,
};
}
return {
x: position.x + x - scrollX,
y: position.y + y,
};
}


protected getColResizeArea() {
const isFrozenCell = this.isFrozenCell();
Expand Down

0 comments on commit 3c8f18d

Please sign in to comment.