make the drawing take up the full size of the canvas? #124
-
was playing with the codepens and I find that I'm not able to get the canvas to draw the entire canvas sometimes and other times I am. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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! |
Beta Was this translation helpful? Give feedback.
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!