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/29 16:23:34 UTC

[GitHub] [incubator-echarts] 100pah edited a comment on issue #12864: [DISCUSS] To find better solutions for detecting touchable device

100pah edited a comment on issue #12864:
URL: https://github.com/apache/incubator-echarts/issues/12864#issuecomment-651224808


   @plainheart @wf123537200 
   It's indeed a headache problem. I used to fix this kind of issue for some Windows touching device that both support touch and mouse (like Surface). But it still difficult to cover all of the cases. And it makes things worse that there are always no such type of devices to test.
   
   So I think it's a practical way to provide an option for users to control that.
   Not neat, but probably works.
   
   But not sure what that option like.
   Like you said, the option could be `opt.touchEventsSupported`.
   But at present even though `touchEventsSupported` is set as `true`, zrender still may not use touch event (if pointer event is detected as supported). 
   So is it a better idea that make the option more straight forward like:
   ```ts
   opt: {
       nativeEventSystem: 'touch' | 'pointer' | 'mouse'
   }
   ```
   + If `nativeEventSystem` is specified as 'touch', we manually set 
   `env.touchEventsSupported = true` and `env.pointerEventsSupported = false`.
   + If `nativeEventSystem` is specified as 'pointer', we manually set 
   `env.pointerEventsSupported = true`.
   + If `nativeEventSystem` is specified as 'mouse' or not specified, we manually set 
   `env.touchEventsSupported = false` and `env.pointerEventsSupported = false`.
   
   Not sure for that.
   @pissang @Ovilia any better ideas?


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