-
Notifications
You must be signed in to change notification settings - Fork 5
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
Export in fabric_drawing() #11
Comments
Hi, @dtkaplan for now there is only one method for saving the drawing which the export button that saves the canvas as a PNG image. What do you mean exactly by the |
You can find here some examples concerning the export button https://ihaddadenfodil.com/post/fabricerin-a-tutorial/ |
Thanks for your quick response. And for your tolerance of my asking a
beginner’s question.
Your system works perfectly when I compile it into an html_document or any
other format with the default runtime. I should have tried this first.
My particular interest is to include drawing in {shiny} or {learnr} apps.
For instance, I’m developing a large set of tutorials for a calculus
course—-here’s an example
<https://maa-statprep.shinyapps.io/142Z-DD-07/#section-graphing-anti-derivatives>—-where
students can hand-in their work. It would be great to be able to provide
students with exercises where, for instance, they annotate a graphic. I
need somehow to grab the blog and transfer it to a shiny object.
I suppose that the path I should follow is to find out how to build shiny
widgets. Thanks for your contributions to the R community and for your help
to me.
…On Fri, Jan 29, 2021 at 5:36 PM Ihaddaden Mohamed El Fodil < ***@***.***> wrote:
You can find here some examples concerning the export button
https://ihaddadenfodil.com/post/fabricerin-a-tutorial/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAECBLM6DIFI5LF75WHZJZDS4NA57ANCNFSM4WZV2M7A>
.
|
Hi, thanks @dtkaplan I find the idea interesting, add an additional layer to a shiny output so that one (for example) can draw on it, unfortunately, at the moment I don't have the skills required to create this feature as it's quite complex. Will think about it tough, thanks again. |
There's an export button connected to the canvas produced by
fabric_drawing()
, and I can see in the source code that the click method invokessaveAs()
. But I don't know how to getsaveAs()
to save the blob, or if it is saving it, where that is. I'm not a JavaScript programmer, which is precisely why tools like this are so helpful. I've looked through various forums aboutsaveAs()
, some suggesting that one needs to implement the function in the document (which I've tried, creating a stub that indeed gets called when clicking "export." Others suggest thatsaveAs()
is built-in to the browser, but you need to set certain permissions to use it.I wonder if you might include an example in the package that allows drawings to be saved or copied to the clipboard or a Shiny object or whatever. This would be extremely helpful in the application I'm developing for letting statistics and math students draw on top of graphs and hand in their work.
The text was updated successfully, but these errors were encountered: