Skip to content

make the drawing take up the full size of the canvas? #124

Closed Answered by KaliedaRik
davehorner asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Dave! Many thanks for your continued interest in SC.

I'm seeing this in your CodePen:

If we add some background colors to the canvas, we can see what's going on:

Solution: Don't use CSS to size the canvas element - let SC do the work for you. The truth is, CSS and the <canvas> element despise each other and will do everything in their power to not play nicely together. SC includes functionality to make the <canvas> element more responsive within the page. This is covered in detail in the second learning thing on the SC website - here: https://scrawl-v8.rikweb.org.uk/learn/second-lesson.

I hope this helps. Happy coding!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@davehorner
Comment options

Answer selected by davehorner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants