fix: table cell vertical align error after page scaled #165
Co-authored-by: turingcat <tuburing@gmail.com>
This commit is contained in:
@@ -135,7 +135,7 @@ export class Position {
|
|||||||
|| td.verticalAlign == VerticalAlign.BOTTOM
|
|| td.verticalAlign == VerticalAlign.BOTTOM
|
||||||
) {
|
) {
|
||||||
const rowsHeight = rowList.reduce((pre, cur) => pre + cur.height, 0)
|
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
|
const offsetHeight = td.verticalAlign === VerticalAlign.MIDDLE ? blankHeight / 2 : blankHeight
|
||||||
if (Math.floor(offsetHeight) > 0) {
|
if (Math.floor(offsetHeight) > 0) {
|
||||||
td.positionList.forEach(tdPosition => {
|
td.positionList.forEach(tdPosition => {
|
||||||
|
|||||||
Reference in New Issue
Block a user