/NomadCoder-PaintJS

Clone Coding Repository for "JavaScript for Beginner 2" Course of NomadCoder

Primary LanguageJavaScript

NomadCoder-PaintJS

Clone Coding Repository for "JavaScript for Beginner 2" Course of NomadCoder

Lecture Link: https://nomadcoders.co/javascript-for-beginners-2

  • Lecture Language: English (Administrated in Korean)

Purpose / Goal

  • To recap JavaScript basics and be familiar with some JavaScript functions and HTML components that will use frequently in websites.
  • At the end of the course, I am expected to build a simple painting board.

What I Learn

  • Canvas API is used to draw graphics with JavaScript
  • a tag can have download attribute, which makes users not to navigate to the URL but to download the linked URL.
    • It should contains link of the file in href attribute, and download attribute should have file name.

Project

Painting Board

Followed the lecture contents to build simple patining board. Only used HTML, CSS, and Vanilla JavaScript.

Feature List (From Lecture)

  • Drawing on the canvas
    • Handle mouse events
    • Change Color and Thickness of brush
    • Fill/Paint on the canvas
    • Save Image
  • Design for Desktop site (CSS)

What I added/modified

  • Touch Screen Event Handler
  • Restore drawings and settings when canvas resized
  • Change Design (CSS)
    • Full-size canvas
    • Show/Hide Control Panel
    • Indicate which color is currently selected
  • Design for Mobile Site (CSS)
Demo Image of Painting Board

Code Link: https://github.com/hyecheol123/NomadCoder-PaintJS/tree/main/painting-board
Demo Link: https://hyecheol123.github.io/NomadCoder-PaintJS/painting-board/