Merge pull request #78 from Hufe921/feature/paragraph-selection

fix:set cursor position after mouse down
This commit is contained in:
Hufe
2022-10-10 23:22:58 +08:00
committed by GitHub
+1
View File
@@ -242,6 +242,7 @@ export class CanvasEvent {
const isDirectHitCheckbox = !!(isDirectHit && isCheckbox) const isDirectHitCheckbox = !!(isDirectHit && isCheckbox)
if (~index) { if (~index) {
this.range.setRange(curIndex, curIndex) this.range.setRange(curIndex, curIndex)
this.position.setCursorPosition(positionList[curIndex])
// 复选框 // 复选框
const isSetCheckbox = isDirectHitCheckbox && !isReadonly const isSetCheckbox = isDirectHitCheckbox && !isReadonly
if (isSetCheckbox) { if (isSetCheckbox) {