Cleanup knockout commands and replaced EventKeyCode with native KeyboardEvent.key

This commit is contained in:
djmaze 2020-09-17 17:47:35 +02:00
parent d06fed09d6
commit 7ac8143f34
9 changed files with 87 additions and 118 deletions

View file

@ -41,7 +41,7 @@ ko.extenders.posInterer = (target, defaultVal) => {
const Utils = require('Common/Utils'),
result = ko.computed({
read: target,
write: (newValue) => {
write: newValue => {
let val = Utils.pInt(newValue.toString(), defaultVal);
if (0 >= val) {
val = defaultVal;