This commit is contained in:
Devine Lu Linvega
2019-01-09 16:53:28 +12:00
parent 44eb30cad5
commit 82dc0919c8
5 changed files with 24 additions and 24 deletions

View File

@@ -61,7 +61,7 @@ function Picker (dotgrid) {
}
this.listen = function (e, is_down = false) {
if (is_down && !is_color_char(e.key)) {
if (is_down && !isColorChar(e.key)) {
e.preventDefault()
return
}
@@ -90,7 +90,7 @@ function Picker (dotgrid) {
return re.test(val)
}
function is_color_char (val) {
function isColorChar (val) {
const re = /[0-9A-Fa-f]/g
return re.test(val)
}