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 2021/10/17 00:48:39 UTC

[GitHub] [echarts] susiwen8 commented on a change in pull request #15847: Feat(line): mouse event on polyline and polygon

susiwen8 commented on a change in pull request #15847:
URL: https://github.com/apache/echarts/pull/15847#discussion_r729809717



##########
File path: src/chart/line/LineView.ts
##########
@@ -877,9 +882,46 @@ class LineView extends ChartView {
         this._points = points;
         this._step = step;
         this._valueOrigin = valueOrigin;
+        this.mouseEvent(seriesModel, api);
     }
 
-    dispose() {}
+    dispose() { 
+        this._polyline.off('click').off('mouseover');
+        this._polygon && this._polygon.off('click').off('mouseover');
+    }
+
+    mouseEvent(seriesModel: LineSeriesModel, api: ExtensionAPI) {

Review comment:
       Right, that much easy.




-- 
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: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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