fix: not allow change zone in continuous mode #201

Co-authored-by: Hufe921 <huangyunfeihufe@hotmail.com>
pr675
Captain 3 years ago committed by GitHub
parent 0a0ab44058
commit 16c2e9a6d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -620,6 +620,7 @@ export class Draw {
this._disconnectLazyRender() this._disconnectLazyRender()
this.header.recovery() this.header.recovery()
this.footer.recovery() this.footer.recovery()
this.zone.setZone(EditorZone.MAIN)
} }
this.render({ this.render({
isSubmitHistory: false, isSubmitHistory: false,

@ -3,16 +3,18 @@ import { LETTER_REG, NUMBER_LIKE_REG } from '../../../dataset/constant/Regular'
import { CanvasEvent } from '../CanvasEvent' import { CanvasEvent } from '../CanvasEvent'
function dblclick(host: CanvasEvent, evt: MouseEvent) { function dblclick(host: CanvasEvent, evt: MouseEvent) {
// 切换区域
const draw = host.getDraw() const draw = host.getDraw()
const position = draw.getPosition() const position = draw.getPosition()
const positionContext = position.getPositionByXY({ // 切换区域
x: evt.offsetX, if (draw.getIsPagingMode()) {
y: evt.offsetY const positionContext = position.getPositionByXY({
}) x: evt.offsetX,
if (!~positionContext.index && positionContext.zone) { y: evt.offsetY
draw.getZone().setZone(positionContext.zone) })
return if (!~positionContext.index && positionContext.zone) {
draw.getZone().setZone(positionContext.zone)
return
}
} }
// 自动扩选文字 // 自动扩选文字
const cursorPosition = position.getCursorPosition() const cursorPosition = position.getCursorPosition()

Loading…
Cancel
Save