Skip to content
Extraits de code Groupes Projets
Valider 00d3b797 rédigé par Deurstann's avatar Deurstann
Parcourir les fichiers

Fix current kara check

parent 6c105410
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!15Playlist system creation
...@@ -9,6 +9,7 @@ const { ipcRenderer } = require('electron'), ...@@ -9,6 +9,7 @@ const { ipcRenderer } = require('electron'),
var countKaraInQueue = 0; var countKaraInQueue = 0;
var currentSong = -1; var currentSong = -1;
var currentSongElement; var currentSongElement;
var currentSongPos=0;
var dragCounter = 0; var dragCounter = 0;
var leavedElement; var leavedElement;
var isDnDFromDB = false; var isDnDFromDB = false;
...@@ -359,16 +360,17 @@ ipcRenderer.on('send-song-time-data', (event, timeData) => { ...@@ -359,16 +360,17 @@ ipcRenderer.on('send-song-time-data', (event, timeData) => {
if(currentSongElement){ if(currentSongElement){
currentSongElement.style.background = '#4e5d6c' currentSongElement.style.background = '#4e5d6c'
} }
pos = parseInt(timeData.song)+1; currentSongPos = parseInt(timeData.song)+1;
currentSongElement = document.getElementById(`pos-${pos.toString()}`).parentElement; currentSongElement = document.getElementById(`pos-${currentSongPos.toString()}`).parentElement;
currentSong = timeData.song; currentSong = timeData.song;
currentSongElement.style.background = '#6b7d8e'; currentSongElement.style.background = '#6b7d8e';
currentSongElement.scrollIntoView(true) currentSongElement.scrollIntoView(true)
} }
currentSongElement.style.background = '#6b7d8e'; document.getElementById(`pos-${currentSongPos.toString()}`).parentElement.style.background = '#6b7d8e';
} else if (currentSongElement) { } else {
currentSongElement.style.background = '#4e5d6c'; if (currentSongElement) currentSongElement.style.background = '#4e5d6c';
document.getElementById(`pos-${currentSongPos.toString()}`).parentElement.style.background = '#4e5d6c'
} }
}); });
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter