Commit d6e44395 authored by flothoni's avatar flothoni

shortcut.js; fix bug present since shortcut become a view

Link to #4303 & commit 4f2819381
parent 6ec207d2
Pipeline #150957 passed with stages
in 12 minutes and 24 seconds
......@@ -47,12 +47,17 @@ Shortcut.prototype = {
this.system_shortcuts = {}
for (var system in germline_data.systems){
var keycode = germline_data.systems[system].shortcut.toUpperCase().charCodeAt(0)
if (typeof this.system_shortcuts[keycode] == "undefined")
this.system_shortcuts[keycode] = []
this.system_shortcuts[keycode].push(system)
if (germline_data.systems[system].shortcut != undefined){ // at init/load, some data are not present
var keycode = germline_data.systems[system].shortcut.toUpperCase().charCodeAt(0)
if (typeof this.system_shortcuts[keycode] == "undefined")
this.system_shortcuts[keycode] = []
this.system_shortcuts[keycode].push(system)
} else {
console.default.log("Shortcuts; system undefined: " + system)
}
}
document.onkeydown = function (e) { self.checkKey(e); }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment