Skip to content

Commit

Permalink
fix: table cell vertical align error after page scaled #165
Browse files Browse the repository at this point in the history
Co-authored-by: turingcat <tuburing@gmail.com>
  • Loading branch information
turingcat0101 and xavier711 authored Mar 31, 2023
1 parent f11d5c8 commit 1fa1d10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/editor/core/position/Position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down

0 comments on commit 1fa1d10

Please sign in to comment.