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/06/19 14:50:35 UTC

[GitHub] [incubator-echarts] susiwen8 commented on a change in pull request #12834: fix: #12812

susiwen8 commented on a change in pull request #12834:
URL: https://github.com/apache/incubator-echarts/pull/12834#discussion_r442881717



##########
File path: src/echarts.js
##########
@@ -1142,8 +1142,22 @@ echartsProto.resize = function (opts) {
     flushPendingActions.call(this, silent);
 
     triggerUpdatedEvent.call(this, silent);
+
+    hideTooltip.call(this);
 };
 
+/**
+ * when alwaysShowContent is true change or rotation window size and restore will hide tooltip
+ */
+function hideTooltip() {
+    const tooltips = this._componentsViews.filter(item => item.__model.mainType === 'tooltip');

Review comment:
       Please use ES3, so `const` and `filter` are not allowed to be used in this project
   https://echarts.apache.org/zh/coding-standard.html#language-features

##########
File path: src/echarts.js
##########
@@ -1142,8 +1142,22 @@ echartsProto.resize = function (opts) {
     flushPendingActions.call(this, silent);
 
     triggerUpdatedEvent.call(this, silent);
+
+    hideTooltip.call(this);
 };
 
+/**
+ * when alwaysShowContent is true change or rotation window size and restore will hide tooltip
+ */
+function hideTooltip() {
+    const tooltips = this._componentsViews.filter(item => item.__model.mainType === 'tooltip');

Review comment:
       Also, any property started by '_' are private, so we shouldn't directly manipulate it 




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