plainheart commented on code in PR #20710:
URL: https://github.com/apache/echarts/pull/20710#discussion_r2566890536


##########
src/component/tooltip/TooltipView.ts:
##########
@@ -243,6 +243,11 @@ class TooltipView extends ComponentView {
         const api = this._api;
         const triggerOn = tooltipModel.get('triggerOn');
 
+        if (tooltipModel.option.trigger !== 'axis') {

Review Comment:
   Usually, we don’t go for directly accessing `model.option` in modules 
outside the model. It's better to use `model.get(optionName)` instead.



##########
src/component/tooltip/TooltipView.ts:
##########
@@ -243,6 +243,11 @@ class TooltipView extends ComponentView {
         const api = this._api;
         const triggerOn = tooltipModel.get('triggerOn');
 
+        if (tooltipModel.option.trigger !== 'axis') {
+            // _lastDataByCoordSys is used for axis tooltip.
+            this._lastDataByCoordSys = null;

Review Comment:
   Though this is enough to fix the refresh issue, do we need to reset the 
`_cbParamsList` as well? It also seems to be used only when `trigger` is the 
axis.



##########
src/component/tooltip/TooltipView.ts:
##########


Review Comment:
   I just noticed that we did not reset some objects in the `dispose` function. 
Consider setting `_tooltipContent`, `_tooltipModel`, `_lastDataByCoordSys`, and 
`_cbParamsList` to null.



##########
src/component/tooltip/TooltipView.ts:
##########


Review Comment:
   I just noticed that we did not reset some objects when disposing. Consider 
setting `_tooltipContent`, `_tooltipModel`, `_lastDataByCoordSys`, and 
`_cbParamsList` to null.



##########
src/component/tooltip/TooltipView.ts:
##########


Review Comment:
   The same 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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to