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


##########
src/component/tooltip/TooltipView.ts:
##########
@@ -365,11 +370,13 @@ class TooltipView extends ComponentView {
         else if (payload.x != null && payload.y != null) {
             // FIXME
             // should wrap dispatchAction like `axisPointer/globalListener` ?
-            api.dispatchAction({
-                type: 'updateAxisPointer',
-                x: payload.x,
-                y: payload.y
-            });
+            if (tooltipModel.option.trigger === 'axis') {

Review Comment:
   Logically speaking, I don't think whether the `axisPointer` is enabled makes 
any difference in this regard. If we consider that `setOption` should lead to 
an update of the tooltip, then it is also logical that `setOption` causes the 
`emphasis` state to become updated.
   
   This is also one of the reasons why I'm more inclined to think that the 
issue in this PR isn't a bug. Perhaps keeping the setting of "changing the 
'trigger' via setOption won't trigger the redrawing of the tooltip" would 
simplify matters. May I ask what initially led you to need to fix the problem 
in this PR?



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