ga-wdi-exercises / pixart_js

Use JS events and programmatically generated DOM elements to build a drawing application. [javascript, dom]
MIT License
9 stars 321 forks source link

Matt scott solution #221

Closed chapel-of-bools closed 8 years ago

chapel-of-bools commented 8 years ago

Completeness: 5 / 5 Comfort Level: 2 / 5

How would you go about coding the bonus section with recent color swatches?

RobertAKARobin commented 8 years ago

Something like this:

on submitting the form / clicking the submit button
  get swatch 2's color
    set swatch 3 with that color
  get swatch 1's color
    set swatch 2 with that color
  get the input's value
    set swatch 1 with that color

Then, once that's working:

on clicking a swatch
  set the brush to that color
RobertAKARobin commented 8 years ago