* Displays a song wave form. * * @param {Node} element - Element to display the waveform in. * @param {SVG} svg - The waveform path. * @param {Integer} song - The index of the song we are displaying the * waveform for.
(element, svg, song)
| 404 | * waveform for. |
| 405 | */ |
| 406 | function displaySongWaveform(element, svg, song) { |
| 407 | /* |
| 408 | Ensure it's the active song being displayed. |
| 409 | */ |
| 410 | if (config.active_index == song) { |
| 411 | let waveformPath = element.querySelector("svg g path"); |
| 412 | |
| 413 | waveformPath.setAttribute("d", svg); |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | /** |
| 418 | * Displays a song in playlist waveform. |