add key to hide hover

This commit is contained in:
Hugvey Central Command 2019-08-29 10:15:33 +02:00
parent fc60849a1d
commit 76ba008657
2 changed files with 30 additions and 2 deletions

View file

@ -1,5 +1,7 @@
var ws = new ReconnectingWebSocket( window.location.origin.replace('http', 'ws') +'/ws', null, { debug: false, reconnectInterval: 3000 } ); var ws = new ReconnectingWebSocket( window.location.origin.replace('http', 'ws') +'/ws', null, { debug: false, reconnectInterval: 3000 } );
var seeme = true
//request close before unloading //request close before unloading
window.addEventListener('beforeunload', function(){ window.addEventListener('beforeunload', function(){
ws.close(); ws.close();
@ -96,7 +98,7 @@ checkbox.addEventListener('change', (event) => {
for(let hv of msg['hugveys']){ for(let hv of msg['hugveys']){
console.log(hv['language'], hv['status']); console.log(hv['language'], hv['status']);
let evenOdd = parseInt(hv['id'])%2 ? 'odd': 'even'; let evenOdd = parseInt(hv['id'])%2 ? 'odd': 'even';
let availableClass = hv['available'] ? 'is-available' : 'is-not-available' let availableClass = hv['available'] ? 'is-available' : 'is-not-available'
this.dataGroups.update({id: parseInt(hv['id']), content: 'Hugvey #'+hv['id'], className: `status-${hv['status']} ${availableClass} lang-${hv['language']} ${evenOdd}`}) this.dataGroups.update({id: parseInt(hv['id']), content: 'Hugvey #'+hv['id'], className: `status-${hv['status']} ${availableClass} lang-${hv['language']} ${evenOdd}`})
} }
} }
@ -183,3 +185,27 @@ checkbox.addEventListener('change', (event) => {
} }
var tl = new Timeline(ws, document.getElementById('line'), 29); var tl = new Timeline(ws, document.getElementById('line'), 29);
window.addEventListener('keypress', function(e){
console.log(e.keyCode)
if(e.keyCode==46){
if(seeme){
seeme = false;
let options = {
showTooltips: false
};
tl.timeline.setOptions(options)
}
else{
seeme = true;
let options = {
showTooltips: true
};
tl.timeline.setOptions(options)
}
}
});

View file

@ -29,10 +29,12 @@
border-color: black; border-color: black;
border:none 0px; border:none 0px;
} }
.vis-item.speech { .vis-item.speech {
background-color: greenyellow; background-color: greenyellow;
border-color: green; border-color: green;
border:none 0px; border:none 0px;
color: greenyellow;
} }
.vis-text,.vis-labelset .vis-label { .vis-text,.vis-labelset .vis-label {
@ -104,7 +106,7 @@ font-size: 20pt;
} }
.status-running.lang-en-GB{ .status-running.lang-en-GB{
background-color: #02547e; background-color: #02547e;
} }
.status-running.lang-fr-FR{ .status-running.lang-fr-FR{
background: #5a434d; background: #5a434d;