Skip to content

Commit

Permalink
test: 单测修复, row 带序号时 clip 修复
Browse files Browse the repository at this point in the history
  • Loading branch information
wjgogogo committed Jan 15, 2024
1 parent a620074 commit 478dcb2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2428,12 +2428,12 @@ Array [
"width": 96,
},
Object {
"actualText": "城我是省略号",
"actualText": "城市城@@@",
"actualTextHeight": 16,
"actualTextWidth": 73,
"actualTextWidth": 72,
"height": 30,
"multiLineActualTexts": Array [
"城我是省略号",
"城市城@@@",
],
"originalText": "城市城市城市城市城市城市城市城市城市城市城市城市",
"width": 96,
Expand Down
4 changes: 2 additions & 2 deletions packages/s2-core/src/facet/header/row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class RowHeader extends BaseHeader<RowHeaderConfig> {

this.scrollGroup.style.clipPath = new Rect({
style: {
x: position.x,
x: spreadsheet.facet.cornerBBox.x,
y: position.y + frozenRowGroupHeight,
width,
height: viewportHeight,
Expand All @@ -149,7 +149,7 @@ export class RowHeader extends BaseHeader<RowHeaderConfig> {

this.frozenRowGroup.style.clipPath = new Rect({
style: {
x: position.x,
x: spreadsheet.facet.cornerBBox.x,
y: position.y,
width,
height: frozenRowGroupHeight,
Expand Down
7 changes: 4 additions & 3 deletions packages/s2-core/src/facet/header/series-number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ export class SeriesNumberHeader extends BaseHeader<BaseHeaderConfig> {
}

public clip(): void {
const { width, height, viewportHeight } = this.getHeaderConfig();
const { width, height, viewportHeight, position, spreadsheet } =
this.getHeaderConfig();

this.style.clipPath = new Rect({
style: {
x: 0,
y: 0,
x: spreadsheet.facet.cornerBBox.x,
y: position.y,
width,
height: height + viewportHeight,
},
Expand Down

0 comments on commit 478dcb2

Please sign in to comment.