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/12/07 16:46:46 UTC

[GitHub] [incubator-echarts] plainheart opened a new issue #13777: [BUG] toolbox doesn't enter emphasis state when hovering on the icon.

plainheart opened a new issue #13777:
URL: https://github.com/apache/incubator-echarts/issues/13777


   
   
   ### Version
   5.0.0
   
   ### Steps to reproduce
   Please refer to [test/toolbox-stack.html](https://github.com/apache/incubator-echarts/blob/master/test/toolbox-stack.html)
   
   Compared with 4.x, in ECharts 5.0, the icon does not enter emphasis state when hovering.
   
   **4.x**
   
   ![4.x](https://user-images.githubusercontent.com/26999792/101378381-fbedc380-38ed-11eb-9953-12c3676b39f0.gif)
   
   **5.0**
   
   ![5.0](https://user-images.githubusercontent.com/26999792/101378474-1889fb80-38ee-11eb-8a99-676ba070c6a8.gif)
   
   ### Experimental Steps
   
   I tried to add one line of code below [line 212](https://github.com/apache/incubator-echarts/blob/master/src/component/toolbox/ToolboxView.ts#L212) like this
   ```diff
   ...
   const pathEmphasisState = path.ensureState('emphasis');
   pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle();
   +enableHoverEmphasis(path);
   ...
   ```
   
   and removed [`enterEmphasis(this)`](https://github.com/apache/incubator-echarts/blob/master/src/component/toolbox/ToolboxView.ts#L266) and [`leaveEmphasis(this)`](https://github.com/apache/incubator-echarts/blob/master/src/component/toolbox/ToolboxView.ts#L270) in the `mouseover` & `mouseout` event handlers of the icon path since they seem to be not working.
   
   I'm not sure, but it should work through these changes. 
   
   However, after I added `emphasis.iconStyle.color` as follows, 
   ```js
   emphasis: {
       iconStyle: {
           color: 'red'
       }
   }
   ```
   it will probably throw an error when hovering on the toolbox icons:
   
   ![image](https://user-images.githubusercontent.com/26999792/101377411-bc72a780-38ec-11eb-8310-ed73f23bae56.png)
   
   In the function [`rgba2String`](https://github.com/ecomfe/zrender/blob/master/src/animation/Animator.ts#L243-L249) in zrender/src/animation/Animator.ts, the parameter may be a string `none`, but it expects a number array. I don't know why we got `none`.
   
   ```ts
   function rgba2String(rgba: number[]): string {
       rgba[0] = Math.floor(rgba[0]);
       rgba[1] = Math.floor(rgba[1]);
       rgba[2] = Math.floor(rgba[2]);
   
       return 'rgba(' + rgba.join(',') + ')';
   }
   ```
   
   So I'd like to ask you for help to check if this is a bug and help to fix it if confirmed. Thank you! @pissang 
   
   ### What is expected?
   The toolbox icon should enter emphasis state when hovering.
   
   ### What is actually happening?
   The toolbox icon is still in normal state when hovering.
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->


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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #13777: [BUG] toolbox doesn't enter emphasis state when hovering on the icon.

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #13777:
URL: https://github.com/apache/incubator-echarts/issues/13777#issuecomment-740039056


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical question.
   
   If you are interested in the project, you may also subscribe our [mailing list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


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