fix: elements in the table cannot be selected #378

This commit is contained in:
Hufe921
2023-12-28 22:21:21 +08:00
parent f542739d3e
commit 1477bd0e3f
2 changed files with 17 additions and 4 deletions
+7 -1
View File
@@ -232,13 +232,19 @@ export class RangeManager {
public getIsSelectAll() {
const elementList = this.draw.getElementList()
const { startIndex, endIndex } = this.range
return startIndex === 0 && elementList.length - 1 === endIndex
return (
startIndex === 0 &&
elementList.length - 1 === endIndex &&
!this.position.getPositionContext().isTable
)
}
public getIsPointInRange(x: number, y: number): boolean {
const { startIndex, endIndex } = this.range
const positionList = this.position.getPositionList()
for (let p = startIndex + 1; p <= endIndex; p++) {
const position = positionList[p]
if (!position) break
const {
coordinate: { leftTop, rightBottom }
} = positionList[p]