Justin-ZS commented on code in PR #20710:
URL: https://github.com/apache/echarts/pull/20710#discussion_r1988779419
##########
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:
I found this action causes the `emphasis` state lost.
After dispatch:
<img width="201" alt="截屏2025-03-11 17 10 48"
src="https://github.com/user-attachments/assets/a2dc5a1c-4164-4a69-94a1-2fdb41837daa"
/>
Expected:
<img width="189" alt="截屏2025-03-11 17 17 49"
src="https://github.com/user-attachments/assets/1f809bdf-036a-451c-8d16-d81e3a04952e"
/>
Maybe dispatch this action only when `axisPointer` is enabled would be
better.
Is there any way to check if `axisPointer` is enabled or not?
--
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]