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 2021/04/20 05:33:53 UTC

[GitHub] [echarts] pissang commented on a change in pull request #14688: feat(gauge): Add data index and series index for indexing the data

pissang commented on a change in pull request #14688:
URL: https://github.com/apache/echarts/pull/14688#discussion_r616355952



##########
File path: src/util/innerStore.ts
##########
@@ -51,4 +51,29 @@ export interface ECData {
         option: ComponentItemTooltipOption<unknown>;
     };
 }
+
+const setItemDataAndSeriesIndex = function (this: Element, child: Element): void {
+    const childECData = getECData(child);
+    const thisECData = getECData(this);

Review comment:
       I think `this` context is wrong here.  It's not the root element in `setCommenECData`
   
   Use anonymous function in `setCommonECData` is fine. JS engine will handle it well and won't have a performance issue. Use a separate function with a specified `this` context will be easy to have the above issue.




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