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 2020/05/31 12:37:39 UTC

[GitHub] [incubator-echarts] 100pah commented on a change in pull request #12367: fix(tree): the symbols of image type do not display at the first rendering. close #12279.

100pah commented on a change in pull request #12367:
URL: https://github.com/apache/incubator-echarts/pull/12367#discussion_r432942719



##########
File path: src/chart/tree/TreeView.js
##########
@@ -379,9 +379,8 @@ function updateNode(data, dataIndex, symbolEl, group, seriesModel, seriesScope)
         // Fix #12279.
         // if the type of symbol is image,
         // update symbol's data immediately but not wait until the next update rendering.
-        var symbolType = symbolEl._symbolType;
-        symbolType.indexOf('image://') === 0 
-            && symbolEl.updateData(data, dataIndex, seriesScope);
+        var symbolType = symbolEl.getSymbolPath().type;
+        symbolType === 'image' && symbolEl.updateData(data, dataIndex, seriesScope);

Review comment:
       @plainheart 
   `updateData` has been called in the constructor of `Symbol`, I think it should better not be called again here.
   The actual reason of this issue seams to be in: 
   https://github.com/apache/incubator-echarts/blob/4.8.0/src/chart/helper/Symbol.js#L241
   The reset of "image" symbol should not set `opacity` to `null`.
   `null` is an invalid value for `opacity`.
   I think here the opacity should be reset as `1`. 
   And that can fix this 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