Set color picker default value to black

I noticed that color picker HTML element retains the last picked value from user even after the page is reloaded. This will cause inconsistency between `color` value and the actual `colorEl.value`.

This commit will always initialize color picker default value to black, the same way that `color` variable was set originally.
pull/51/head
imsyf 3 years ago
parent 2c455d26f3
commit 90d76fb5be
No known key found for this signature in database
GPG Key ID: 1C6DB773CB7E0EC4

@ -9,7 +9,8 @@ const ctx = canvas.getContext('2d');
let size = 10
let isPressed = false
let color = 'black'
colorEl.value = 'black'
let color = colorEl.value
let x
let y

Loading…
Cancel
Save