fix: table range drawing boundary error

pr675
Hufe921 2 years ago
parent 5f6c5ec8bc
commit 1df98b9359

@ -1852,22 +1852,22 @@ export class Draw {
startIndex <= index && startIndex <= index &&
index <= endIndex index <= endIndex
) { ) {
// 从行尾开始-绘制最小宽度 const positionContext = this.position.getPositionContext()
if (startIndex === index) { // 表格需限定上下文
const nextElement = elementList[startIndex + 1] if (
if (nextElement && nextElement.value === ZERO) { (!positionContext.isTable && !element.tdId) ||
rangeRecord.x = x + metrics.width positionContext.tdId === element.tdId
rangeRecord.y = y ) {
rangeRecord.height = curRow.height // 从行尾开始-绘制最小宽度
rangeRecord.width += this.options.rangeMinWidth if (startIndex === index) {
} const nextElement = elementList[startIndex + 1]
} else { if (nextElement && nextElement.value === ZERO) {
const positionContext = this.position.getPositionContext() rangeRecord.x = x + metrics.width
// 表格需限定上下文 rangeRecord.y = y
if ( rangeRecord.height = curRow.height
(!positionContext.isTable && !element.tdId) || rangeRecord.width += this.options.rangeMinWidth
positionContext.tdId === element.tdId }
) { } else {
let rangeWidth = metrics.width let rangeWidth = metrics.width
// 最小选区宽度 // 最小选区宽度
if (rangeWidth === 0 && curRow.elementList.length === 1) { if (rangeWidth === 0 && curRow.elementList.length === 1) {

Loading…
Cancel
Save