100pah commented on a change in pull request #11942: Clear all events when
clear() was called #11938
URL:
https://github.com/apache/incubator-echarts/pull/11942#discussion_r361867031
##########
File path: src/echarts.js
##########
@@ -1682,6 +1689,14 @@ echartsProto.clear = function () {
disposedWarning(this.id);
return;
}
+
+ // clear all events
+ var handlers = this.getHandlers();
Review comment:
I think the handler registered by users should better not be cleared when
users called `clear`.
It depends on how we define the term `clear`.
But at least, if making change, that will be a break change.
Users call unregister the listeners via calling `chart.off()`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]