We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
First of all, a huge thank you for your fantastic work! R has never been more accessible to users! Congratulations !
I've detected a bug when I try to make a plot using the console. This bug can be reproduced using the demo on the following page: https://docs.r-wasm.org/webr/latest/examples.html
By typing plot and observing the javascript console log, we can read
console.ts:174 Unhandled output type for webR Console: canvas. run_fn @ console.ts:174
console.ts
To correct this bug, I've changed this locally:
async #run() { for (;;) { const output = await this.webR.read(); switch (output.type) { case 'stdout': this.#stdout(output.data as string); break; case 'stderr': this.#stderr(output.data as string); break; case 'prompt': this.#prompt(output.data as string); break; case 'canvas': this.#canvasImage(output.data.image as ImageBitmap); break; case 'closed': return; default: console.warn(`Unhandled output type for webR Console: ${output.type}.`); } } }
Currently, when a plot is generated by the console, its output.type is canvas and not canvasImage. The second solution is to change this output type.
output.type
canvas
canvasImage
output type
I hope this will be useful to you.
Many thanks again for your work! See you soon!
The text was updated successfully, but these errors were encountered:
Thank you for reporting this! Indeed, this does look like a typo.
I'll get this fixed, hopefully for a 0.2.1 patch release, and try to add a unit test to catch future similar regressions.
Sorry, something went wrong.
Handle canvas graphics events in console.ts
71ee021
Fixes #256
Console
75fbfbb
No branches or pull requests
Hello,
First of all, a huge thank you for your fantastic work! R has never been more accessible to users! Congratulations !
Bug
I've detected a bug when I try to make a plot using the console. This bug can be reproduced using the demo on the following page:
https://docs.r-wasm.org/webr/latest/examples.html
By typing plot and observing the javascript console log, we can read
Suggestions
Way 1 : change
console.ts
To correct this bug, I've changed this locally:
Change type of output from console
Currently, when a plot is generated by the console, its
output.type
iscanvas
and notcanvasImage
. The second solution is to change thisoutput type
.I hope this will be useful to you.
Many thanks again for your work!
See you soon!
The text was updated successfully, but these errors were encountered: