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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]