-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error multitouch emit undefined inside move function #83
Comments
thanks. can you share a (minimal) code to reproduce? |
See the following file: In here I replicate how the XYChart is being handled in my application. |
This seems to: - fix #83 - possibly fix d3/d3-zoom#198 - help with d3/d3-zoom#222
Can you please confirm that #84 would resolve this issue? |
Sure, thanks! |
Hi Fil, |
Excellent! Thank you for the feedback. |
This seems to: - fix #83 - possibly fix d3/d3-zoom#198 - help with d3/d3-zoom#222
* create emit before we use it; make move accept an event. This seems to: - fix #83 - possibly fix d3/d3-zoom#198 - help with d3/d3-zoom#222 * update dependencies * brush.clear event Co-authored-by: Mike Bostock <[email protected]>
Hi, we are still having issues with this problem. Please see the stack trace below. We are using both packages d3 and d3-brush (as a dependency of d3) in the latest versions, i.e. 7.6.1 and 3.0.0, respectively. Please note that the error occurs only if using a touchscreen (e.g. by using the Google Chrome User Agent). Do you have any ideas or suggestions for us? Thanks in advance!
|
Please share a webpage or an observable notebook that exhibits the issue. |
When using a device with multitouch I get an error when outside the chart something is pressed first and held down and afterwards pressing inside the chart.
The error is as following:
TypeError: Cannot read property 'brush' of undefined
TypeError: emitter(...).moved is not a function
TypeError: emitter(...).ended is not a function
Tracing the issue in the D3 bundle I found out that the move function is called before the emit variable is set:
Online debug information:
ContextListener is called first with a TouchStart event
Then inside the started function the move function will be called
Inside move function the emit variable is undefined, hence throwing the error
The text was updated successfully, but these errors were encountered: