You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/11/14 19:13:18 UTC

[GitHub] hling51325 opened a new pull request #9404: fix: #9337 setNormalStyle overwrite style cause new text not effected

hling51325 opened a new pull request #9404: fix: #9337 setNormalStyle overwrite style cause new text not effected
URL: https://github.com/apache/incubator-echarts/pull/9404
 
 
   consider case: 
   in graphic.js:
   ```
   function setElementHoverStyle(el, hoverStl) {
       if (el.__highlighted) {
           singleEnterNormal(el);
           singleEnterEmphasis(el);
       }
   }
   ```
   
   first time: in `singleEnterNormal`, we not cache `__normalStl` yet, then we cache `__normalStl` use `el.style`  in `singleEnterEmphasis`.
   
   second time: in `singleEnterNormal`, we cached `__normalStl`, then call `setStyle(normalStl);`, so we got a changed style, and cache `__normalStl`.... so we always set normal style with first style.
   
   i think solutions:
    1. upside down function call. but it will not keep emphasis style.
    2. find something need change, make sure cache correct normal style

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org