From 0bcb38fde78beb3326a639eb9803b6647b978e8e Mon Sep 17 00:00:00 2001 From: lijinke666 Date: Wed, 11 Dec 2024 17:38:26 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../brush-selection/base-brush-selection.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/s2-core/src/interaction/brush-selection/base-brush-selection.ts b/packages/s2-core/src/interaction/brush-selection/base-brush-selection.ts index 64e33c63d7..fb70510a8e 100644 --- a/packages/s2-core/src/interaction/brush-selection/base-brush-selection.ts +++ b/packages/s2-core/src/interaction/brush-selection/base-brush-selection.ts @@ -772,18 +772,18 @@ export class BaseBrushSelection }; public autoBrushScroll(point: PointLike, isRowHeader = false) { - if (this.isPointInCanvas(point)) { - return false; - } - this.clearAutoScroll(); - const deltaX = point?.x - this.endBrushPoint?.x; - const deltaY = point?.y - this.endBrushPoint?.y; + if (!this.isPointInCanvas(point)) { + const deltaX = point?.x - this.endBrushPoint?.x; + const deltaY = point?.y - this.endBrushPoint?.y; - this.handleScroll(deltaX, deltaY, isRowHeader); + this.handleScroll(deltaX, deltaY, isRowHeader); - return true; + return true; + } + + return false; } public emitBrushSelectionEvent(