From 1fa1d10fc9c279eb1d91b804484019d02fec945d Mon Sep 17 00:00:00 2001 From: turingcat <117611401+turingcat0101@users.noreply.github.com> Date: Fri, 31 Mar 2023 09:36:46 +0800 Subject: [PATCH] fix: table cell vertical align error after page scaled #165 Co-authored-by: turingcat --- src/editor/core/position/Position.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/core/position/Position.ts b/src/editor/core/position/Position.ts index 71035c27e..c6e3e347e 100644 --- a/src/editor/core/position/Position.ts +++ b/src/editor/core/position/Position.ts @@ -135,7 +135,7 @@ export class Position { || td.verticalAlign == VerticalAlign.BOTTOM ) { const rowsHeight = rowList.reduce((pre, cur) => pre + cur.height, 0) - const blankHeight = td.height! - tdGap - rowsHeight + const blankHeight = (td.height! - tdGap) * scale - rowsHeight const offsetHeight = td.verticalAlign === VerticalAlign.MIDDLE ? blankHeight / 2 : blankHeight if (Math.floor(offsetHeight) > 0) { td.positionList.forEach(tdPosition => {