|
|
@ -69,18 +69,14 @@ var drawPalette = function() { |
|
|
|
palette.appendChild(color); |
|
|
|
palette.appendChild(color); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var selection = document.createElement('div'); |
|
|
|
|
|
|
|
selection.className = 'selection'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var heading = document.createElement('h2'); |
|
|
|
var heading = document.createElement('h2'); |
|
|
|
heading.textContent = 'CURRENT COLOR >'; |
|
|
|
heading.textContent = 'CURRENT COLOR >'; |
|
|
|
|
|
|
|
|
|
|
|
var current = document.createElement('div'); |
|
|
|
var current = document.createElement('div'); |
|
|
|
current.className = 'current'; |
|
|
|
current.className = 'current'; |
|
|
|
|
|
|
|
|
|
|
|
selection.appendChild(heading); |
|
|
|
palette.appendChild(heading); |
|
|
|
selection.appendChild(current); |
|
|
|
palette.appendChild(current); |
|
|
|
palette.appendChild(selection); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
palette.addEventListener('click', function(event) { |
|
|
|
palette.addEventListener('click', function(event) { |
|
|
|
if (event.target.className !== 'color') { |
|
|
|
if (event.target.className !== 'color') { |
|
|
|