NightRa commented on code in PR #21655:
URL: https://github.com/apache/echarts/pull/21655#discussion_r3681910129


##########
src/component/helper/RoamController.ts:
##########
@@ -195,16 +205,20 @@ class RoamController extends 
Eventful<RoamEventDefinition> {
                 this.disable();
 
                 this._enabled = true;
-                if (controlType === true || (controlType === 'move' || 
controlType === 'pan')) {
+                if (moveEnabled) {
                     addRoamZrListener(zr, 'mousedown', mousedownHandler, 
zInfoParsed);
                     addRoamZrListener(zr, 'mousemove', mousemoveHandler, 
zInfoParsed);
                     addRoamZrListener(zr, 'mouseup', mouseupHandler, 
zInfoParsed);
                 }
-                if (controlType === true || (controlType === 'scale' || 
controlType === 'zoom')) {
+                if (zoomEnabled) {
                     addRoamZrListener(zr, 'mousewheel', mousewheelHandler, 
zInfoParsed);
+                }
+                if (moveEnabled || zoomEnabled) {
                     addRoamZrListener(zr, 'pinch', pinchHandler, zInfoParsed);
                 }
             }
+            this._moveEnabled = moveEnabled;
+            this._zoomEnabled = zoomEnabled;

Review Comment:
   @plainheart / @100pah - do you want me to implement this as well here? It's 
a bit out of scope and will make the PR quite larger



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to