@@ -212,6 +212,12 @@ export class Visualizer extends Events<VisualizerEvents> {
212
212
// as a result of multichannel or differently configured waveHeight
213
213
this . setContainerHeight ( ) ;
214
214
215
+ // Update regions layer height to match the current visualizer height
216
+ const regionsLayer = this . getLayer ( "regions" ) ;
217
+ if ( regionsLayer ) {
218
+ regionsLayer . height = this . height ;
219
+ }
220
+
215
221
// Set renderers array
216
222
this . renderers = [ this . waveformRenderer ] ;
217
223
if ( isFF ( FF_AUDIO_SPECTROGRAMS ) && this . spectrogramRenderer ) {
@@ -956,18 +962,24 @@ export class Visualizer extends Events<VisualizerEvents> {
956
962
// Update layer dimensions
957
963
const mainLayer = this . getLayer ( "main" ) ;
958
964
if ( mainLayer ) {
965
+ mainLayer . pixelRatio = this . pixelRatio ;
959
966
mainLayer . width = this . width ;
960
967
mainLayer . height = this . height ;
961
968
}
962
969
963
970
// Update other layers
964
971
this . layers . forEach ( ( layer ) => {
965
972
if ( layer . name !== "main" ) {
973
+ layer . pixelRatio = this . pixelRatio ;
966
974
layer . width = this . width ;
967
975
// Only update height for layers that should match the waveform height
968
976
if ( layer . name === "waveform" || layer . name === "spectrogram" || layer . name === "spectrogram-grid" ) {
969
977
layer . height = this . waveformHeight ;
970
978
}
979
+ // Update regions layer height to match the full visualizer height
980
+ if ( layer . name === "regions" ) {
981
+ layer . height = this . height ;
982
+ }
971
983
}
972
984
} ) ;
973
985
0 commit comments