You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to CANIUSE and the release note of Firefox, the offsetX and offsetY have been supported since desktop Firefox 39
Support for MouseEvent.offsetX and MouseEvent.offsetY have been added on desktop (bug 69787, but not on Firefox for Android or Firefox OS (they will be added in Firefox 43).
And they have been also supported by Firefox for Android and Firefox OS since v43
Support for MouseEvent.offsetX and MouseEvent.offsetY have been activated on Firefox for Android and Firefox OS (bug 1204841).
One consideration why I want to propose to change
I can't dispatch a manual event with expected offsetX & offsetY through the constructor of MouseEvent.
Since zrender is still using the stale un-standard layerX/layerY in Firefox, I can't construct a MouseEvent object through
constevent=newMouseEvent('click',{bubbles: false,layerX: 500,// it's private and readonly for Firefox, anyone can't specify it with the constructorlayerY: 600})
Motivation
I'm planning to support mixed event responding in the echarts for AMap plugin: echarts-extension-amap
All the time we can only choose one interactive layer from echarts layer and map layer because of the z-index issue.
But it's possible to get both of them interactive through re-dispatch event to another layer when one layer is clicked, scrolled and etc.
So I tried this feature in the branch feat-mixed-events. It can be working well in Chrome, but can't work in Firefox for the above issue.
Here is a stale caution in the following code,
https://github.com/ecomfe/zrender/blob/master/src/core/event.ts#L62-L75
According to CANIUSE and the release note of Firefox, the
offsetX
andoffsetY
have been supported since desktop Firefox 39And they have been also supported by Firefox for Android and Firefox OS since v43
One consideration why I want to propose to change
I can't dispatch a manual event with expected
offsetX
&offsetY
through the constructor ofMouseEvent
.Since zrender is still using the stale un-standard layerX/layerY in Firefox, I can't construct a
MouseEvent
object throughMotivation
I'm planning to support mixed event responding in the echarts for AMap plugin: echarts-extension-amap
All the time we can only choose one interactive layer from echarts layer and map layer because of the z-index issue.
But it's possible to get both of them interactive through re-dispatch event to another layer when one layer is clicked, scrolled and etc.
So I tried this feature in the branch feat-mixed-events. It can be working well in Chrome, but can't work in Firefox for the above issue.
A demo is available here.
The text was updated successfully, but these errors were encountered: