100pah commented on code in PR #20447:
URL: https://github.com/apache/echarts/pull/20447#discussion_r2049079965


##########
src/component/tooltip/TooltipView.ts:
##########
@@ -472,7 +471,21 @@ class TooltipView extends ComponentView {
 
             let seriesDispatcher: Element;
             let cmptDispatcher: Element;
-            findEventDispatcher(el, (target) => {
+            findEventDispatcher(el, function(target) {
+                // Check if el has any ancestor that has tooltipDisabled: true.

Review Comment:
   should fix the lint.



##########
src/component/tooltip/TooltipView.ts:
##########
@@ -472,7 +471,21 @@ class TooltipView extends ComponentView {
 
             let seriesDispatcher: Element;
             let cmptDispatcher: Element;
-            findEventDispatcher(el, (target) => {
+            findEventDispatcher(el, function(target) {
+                // Check if el has any ancestor that has tooltipDisabled: true.
+                let tooltipDisabled = false;
+                let parent = el;
+                while (parent) {
+                    if (parent.tooltipDisabled) {
+                        tooltipDisabled = true;
+                        break;
+                    }
+                    parent = parent.parent;

Review Comment:
   The `findEventDispatcher(` itself travels from the original input 
`el`(include) alone its ancestors.
   Thus it's not appropriate to travel to ancestor in the callback.
   



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