fix: disable zone tip in continuous page mode #638
This commit is contained in:
@@ -6,6 +6,7 @@ import { I18n } from '../i18n/I18n'
|
|||||||
import { Zone } from './Zone'
|
import { Zone } from './Zone'
|
||||||
|
|
||||||
export class ZoneTip {
|
export class ZoneTip {
|
||||||
|
private draw: Draw
|
||||||
private zone: Zone
|
private zone: Zone
|
||||||
private i18n: I18n
|
private i18n: I18n
|
||||||
private container: HTMLDivElement
|
private container: HTMLDivElement
|
||||||
@@ -17,6 +18,7 @@ export class ZoneTip {
|
|||||||
private currentMoveZone: EditorZone | undefined
|
private currentMoveZone: EditorZone | undefined
|
||||||
|
|
||||||
constructor(draw: Draw, zone: Zone) {
|
constructor(draw: Draw, zone: Zone) {
|
||||||
|
this.draw = draw
|
||||||
this.zone = zone
|
this.zone = zone
|
||||||
this.i18n = draw.getI18n()
|
this.i18n = draw.getI18n()
|
||||||
this.container = draw.getContainer()
|
this.container = draw.getContainer()
|
||||||
@@ -45,7 +47,7 @@ export class ZoneTip {
|
|||||||
this.pageContainer.addEventListener(
|
this.pageContainer.addEventListener(
|
||||||
'mousemove',
|
'mousemove',
|
||||||
throttle((evt: MouseEvent) => {
|
throttle((evt: MouseEvent) => {
|
||||||
if (this.isDisableMouseMove) return
|
if (this.isDisableMouseMove || !this.draw.getIsPagingMode()) return
|
||||||
if (!evt.offsetY) return
|
if (!evt.offsetY) return
|
||||||
if (evt.target instanceof HTMLCanvasElement) {
|
if (evt.target instanceof HTMLCanvasElement) {
|
||||||
const mousemoveZone = this.zone.getZoneByY(evt.offsetY)
|
const mousemoveZone = this.zone.getZoneByY(evt.offsetY)
|
||||||
|
|||||||
Reference in New Issue
Block a user