fix:cannot cut whole line except the first page
This commit is contained in:
@@ -19,12 +19,14 @@ export function cut(host: CanvasEvent) {
|
|||||||
if (startIndex === endIndex) {
|
if (startIndex === endIndex) {
|
||||||
const position = draw.getPosition()
|
const position = draw.getPosition()
|
||||||
const positionList = position.getPositionList()
|
const positionList = position.getPositionList()
|
||||||
const curRowNo = positionList[startIndex].rowNo
|
const startPosition = positionList[startIndex]
|
||||||
|
const curRowNo = startPosition.rowNo
|
||||||
|
const curPageNo = startPosition.pageNo
|
||||||
const cutElementIndexList: number[] = []
|
const cutElementIndexList: number[] = []
|
||||||
for (let p = 0; p < positionList.length; p++) {
|
for (let p = 0; p < positionList.length; p++) {
|
||||||
const position = positionList[p]
|
const position = positionList[p]
|
||||||
if (position.rowNo > curRowNo) break
|
if (position.pageNo > curPageNo) break
|
||||||
if (position.rowNo === curRowNo) {
|
if (position.pageNo === curPageNo && position.rowNo === curRowNo) {
|
||||||
cutElementIndexList.push(p)
|
cutElementIndexList.push(p)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user