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/06/15 06:22:25 UTC

[GitHub] [incubator-echarts] heibaikn opened a new issue #12804: worker线程中 无法实现tooltip

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


   # Version
   4.8.0
   
   # Steps to reproduce
   1、仿照微信已实现 worker 线程绘制canvas [微信版echarts](https://echarts.apache.org/zh/tutorial.html#%E5%9C%A8%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%B8%AD%E4%BD%BF%E7%94%A8%20ECharts)
   2、实现 wx版 ec-canvas.js的touchaStart方法,方法可以触发,但`handler.processGesture(wrapTouch(e), 'start')`后canvas无响应
   ```
       touchStart(e) {
         if (this.chart && e.touches.length > 0) {
   
           var touch = e.touches[0];
           var handler = this.chart.getZr().handler;
           handler.dispatch('mousedown', {
             zrX: touch.x,
             zrY: touch.y
           });
           handler.dispatch('mousemove', {
             zrX: touch.x,
             zrY: touch.y
           });
           handler.processGesture(wrapTouch(e), 'start');
         }
       },
   ```
   3、运行时差异, 微信版本和worker线程初始化的环境变量不一致,从而导致 var handler = this.chart.getZr().handler; 中 handler的值不一致
   ```
   var env = {};
   
   if (typeof genie === 'object' && typeof wx.getSystemInfoSync === 'function') {
       // In Weixin Application
       env = {
           browser: {},
           os: {},
           node: false,
           wxa: true, // Weixin Application
           canvasSupported: true,
           svgSupported: false,
           touchEventsSupported: true,
           domSupported: false
       };
   }
   else if (typeof document === 'undefined' && typeof self !== 'undefined') {
       // In worker
       env = {
           browser: {},
           os: {},
           node: false,
           worker: true,
           canvasSupported: true,
           domSupported: false
       };
   }
   ```
   
   ![image](https://user-images.githubusercontent.com/17714507/84613845-e37c8d80-aef6-11ea-8522-4b5a52475087.png)
   
   # What is expected?
   显示 tooltip
   
   # What is actually happening?
   不显示tooltip
   
   


----------------------------------------------------------------
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 #12804: worker线程中 无法实现tooltip

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


   This issue is not created using [issue template](https://ecomfe.github.io/echarts-issue-helper/) so I'm going to close it. 🙊
   Sorry for this, but it helps save our maintainers' time so that more developers get helped.
   Feel free to create another issue using the issue template.
   
   If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again.
   
   这个 issue 未使用 [issue 模板](https://ecomfe.github.io/echarts-issue-helper/?lang=zh-cn) 创建,所以我将关闭此 issue。
   为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。
   如果您愿意,可以请使用 issue 模板重新创建 issue。
   
   如果你认为虽然没有使用模板,但你已经提供了复现问题的充分描述,或者你的问题无法使用模板表达,也可以重新 open 这个 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


[GitHub] [incubator-echarts] echarts-bot[bot] closed issue #12804: worker线程中 无法实现tooltip

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] closed issue #12804:
URL: https://github.com/apache/incubator-echarts/issues/12804


   


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