From bf322dfea334ee242a452c44fdb613a1937d963b Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Tue, 4 Jun 2024 21:25:50 +0800 Subject: [PATCH] fix: disable zone tip in continuous page mode #638 --- src/editor/core/zone/ZoneTip.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/editor/core/zone/ZoneTip.ts b/src/editor/core/zone/ZoneTip.ts index 46e3c27..7ae7286 100644 --- a/src/editor/core/zone/ZoneTip.ts +++ b/src/editor/core/zone/ZoneTip.ts @@ -6,6 +6,7 @@ import { I18n } from '../i18n/I18n' import { Zone } from './Zone' export class ZoneTip { + private draw: Draw private zone: Zone private i18n: I18n private container: HTMLDivElement @@ -17,6 +18,7 @@ export class ZoneTip { private currentMoveZone: EditorZone | undefined constructor(draw: Draw, zone: Zone) { + this.draw = draw this.zone = zone this.i18n = draw.getI18n() this.container = draw.getContainer() @@ -45,7 +47,7 @@ export class ZoneTip { this.pageContainer.addEventListener( 'mousemove', throttle((evt: MouseEvent) => { - if (this.isDisableMouseMove) return + if (this.isDisableMouseMove || !this.draw.getIsPagingMode()) return if (!evt.offsetY) return if (evt.target instanceof HTMLCanvasElement) { const mousemoveZone = this.zone.getZoneByY(evt.offsetY)