clement-pages commited on
Commit
41d995e
·
1 Parent(s): b3a508e

fix regions height in monochannel case

Browse files
pyannote_viewer/frontend/player/AudioPlayer.svelte CHANGED
@@ -94,7 +94,7 @@
94
  color: colors[segment.channel % colors.length],
95
  });
96
 
97
- const regionHeight = 100 / numChannels;
98
  region.element.style.cssText += `height: ${regionHeight}% !important;`;
99
  // TODO: Can we do better than force region color ?
100
  region.element.style.cssText += `background-color: ${region.color} !important;`;
 
94
  color: colors[segment.channel % colors.length],
95
  });
96
 
97
+ const regionHeight = 100 / (value.multichannel ? numChannels : 1);
98
  region.element.style.cssText += `height: ${regionHeight}% !important;`;
99
  // TODO: Can we do better than force region color ?
100
  region.element.style.cssText += `background-color: ${region.color} !important;`;