fix: double-click to expand selection boundary error

This commit is contained in:
Hufe921
2023-12-25 21:21:28 +08:00
parent cda46a910f
commit 0bd4c5cc51
+3 -1
View File
@@ -57,8 +57,10 @@ function dblclick(host: CanvasEvent, evt: MouseEvent) {
}
}
// 设置选中区域
const startIndex = index - upCount - 1
if (!~startIndex) return
const rangeManager = draw.getRange()
rangeManager.setRange(index - upCount - 1, index + downCount)
rangeManager.setRange(startIndex, index + downCount)
// 刷新文档
draw.render({
isSubmitHistory: false,