Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Anyone a JS Canvas pro who can help me out?
Post Body

So apologies that I’m new to Canvas and my code is probably terrible but here’s my repo:

https://github.com/AlexJMartinez/canvas-template

If you check out the code you’ll see I have a download button that should allow me to download whatever I’ve generated in the Canvas element. That functionality works except the export only shows the first draw() that happens, I have a click event so that anytime you click within the canvas element something gets drawn so I want to be exporting the current contents or state of the canvas element not just the first draw() that happens.

I feel like either I need to set up state so that I can then export the current state or need to be using the save() and restore() functions properly but yea I’m stuck so if anyone can shed some light that be amazing.

Thanks!

Author
Account Strength
70%
Account Age
3 years
Verified Email
Yes
Verified Flair
No
Total Karma
148
Link Karma
129
Comment Karma
19
Profile updated: 3 days ago
Posts updated: 1 day ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago