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 2020/08/13 16:39:50 UTC

[GitHub] [incubator-echarts] pissang commented on a change in pull request #13121: fix(bar-race): fix bug with animation

pissang commented on a change in pull request #13121:
URL: https://github.com/apache/incubator-echarts/pull/13121#discussion_r470082608



##########
File path: src/chart/bar/BarView.ts
##########
@@ -382,23 +403,6 @@ class BarView extends ChartView {
         this._backgroundEls = bgEls;
 
         this._data = data;
-
-        if (lastAnimator) {
-            lastAnimator.during(() => {

Review comment:
       Other logics about lastAnimator can also be removed now

##########
File path: src/chart/bar/BarView.ts
##########
@@ -534,6 +540,13 @@ class BarView extends ChartView {
         this._clear(this._model);
     }
 
+    removeOnRenderedListener(api: ExtensionAPI) {

Review comment:
       listener should also be removed in `dispose` and `remove`

##########
File path: src/chart/bar/BarView.ts
##########
@@ -534,6 +540,13 @@ class BarView extends ChartView {
         this._clear(this._model);
     }
 
+    removeOnRenderedListener(api: ExtensionAPI) {
+        if (this._onRendered) {
+            api.getZr().off('rendered', this._onRendered as any);
+            this._onRendered = null;

Review comment:
       why `as any` here?




----------------------------------------------------------------
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



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