You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2019/11/26 04:48:09 UTC

[GitHub] [incubator-echarts] pissang commented on a change in pull request #11710: feature: support `toolbox.dataZoom` `brush component` `dataZoom.slide…

pissang commented on a change in pull request #11710: feature: support `toolbox.dataZoom` `brush component` `dataZoom.slide…
URL: https://github.com/apache/incubator-echarts/pull/11710#discussion_r350220635
 
 

 ##########
 File path: src/component/helper/BrushController.js
 ##########
 @@ -903,9 +911,24 @@ function handleDragEnd(controller, e, isGlobalOut) {
 
         // trigger event shoule be at final, after procedure will be nested.
         eventParams && trigger(controller, eventParams);
+
+        unmountHandlers(controller._zr, controller._pageHandlers);
     }
 }
 
+function getLocalMouseXY(event, zr) {
+    var x = event.offsetX;
+    var y = event.offsetY;
+    var w = zr.getWidth();
+    var h = zr.getHeight();
+    x < 0 && (x = 0);
+    x > w && (x = w);
+    y < 0 && (y = 0);
+    y > h && (y = h);
+
+    return [x, y];
 
 Review comment:
   I think there is no need to clamp the mouse position to the canvas area.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org