Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev/0.11.0' into feat/pivot-chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Sep 19, 2023
2 parents f66a622 + 1923a5d commit cc735cd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: the width and height of the container is changed, chart display exception. #338\n\n",
"type": "patch",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: chart shake when after resize container #344\n\n",
"type": "patch",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
2 changes: 1 addition & 1 deletion packages/vtable/src/scenegraph/layout/compute-col-width.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function computeColsWidth(table: BaseTableAPI, colStart?: number, colEnd?
totalDrawWidth -
(update
? newWidths.reduce((acr, cur, index) => {
if (index >= table.rowHeaderLevelCount && index !== newWidths.length - 1) {
if (index >= table.rowHeaderLevelCount && index <= table.colCount - table.rightFrozenColCount - 2) {
return acr + cur;
}
return acr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function computeRowsHeight(
totalDrawHeight -
(update
? newHeights.reduce((acr, cur, index) => {
if (index >= table.frozenRowCount && index !== newHeights.length - 1) {
if (index >= table.frozenRowCount && index <= table.rowCount - table.bottomFrozenRowCount - 2) {
return acr + cur;
}
return acr;
Expand Down
3 changes: 2 additions & 1 deletion packages/vtable/src/scenegraph/scenegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export class Scenegraph {
* @return {*}
*/
updateColWidth(col: number, detaX: number) {
updateColWidth(this, col, detaX);
updateColWidth(this, col, Math.round(detaX));
// this.updateContainerWidth(col, detaX);
this.updateContainer();
}
Expand Down Expand Up @@ -851,6 +851,7 @@ export class Scenegraph {
}

updateRowHeight(row: number, detaY: number) {
detaY = Math.round(detaY);
updateRowHeight(this, row, detaY);
this.updateContainerHeight(row, detaY);
}
Expand Down

0 comments on commit cc735cd

Please sign in to comment.