From 3f615b23f968ebce88b5636ce119d4463e49c2b7 Mon Sep 17 00:00:00 2001 From: water <672684719@qq.com> Date: Tue, 11 Aug 2026 01:11:57 +0800 Subject: [PATCH] fix(roam): respect globalPan mutex in mouseup/mousedown to keep zoom cursor When the toolbox dataZoom is active, the BrushController takes the 'globalPan' interaction mutex and the RoamController's mousemove handler already defers to it. However the mousedown/mouseup handlers were not checking the mutex, so releasing the mouse after a zoom drag reset the cursor back to 'default' (via _decideCursorStyle) instead of keeping the zoom crosshair cursor. Add the same interactionMutex.isTaken(zr, 'globalPan') guard to _mousedownHandler and _mouseupHandler so the RoamController never overrides the cursor while the dataZoom brush is active. close #21723 --- src/component/helper/RoamController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/component/helper/RoamController.ts b/src/component/helper/RoamController.ts index b983b41d8a..3d14b1bbf6 100644 --- a/src/component/helper/RoamController.ts +++ b/src/component/helper/RoamController.ts @@ -279,6 +279,7 @@ class RoamController extends Eventful { private _mousedownHandler(e: ZRElementEvent) { if (eventTool.isMiddleOrRightButtonOnMouseUpDown(e) + || interactionMutex.isTaken(this._zr, 'globalPan') || eventConsumed(e) ) { return; @@ -349,7 +350,9 @@ class RoamController extends Eventful { } private _mouseupHandler(e: ZRElementEvent) { - if (eventConsumed(e)) { + if (interactionMutex.isTaken(this._zr, 'globalPan') + || eventConsumed(e) + ) { return; } const zr = this._zr;