Fix application of scales to montage streams

This commit is contained in:
Isaac Connor 2020-09-05 09:15:33 -04:00
parent bf895f8f12
commit b3b6445d60
1 changed files with 9 additions and 7 deletions

View File

@ -59,15 +59,17 @@ function selectLayout(element) {
var width = parseInt($('width').get('value'));
var height = parseInt($('height').get('value'));
var scale = $('scale').get('value');
if ( scale ) {
} else if ( width ) {
scale = parseInt(100*width/monitor.width);
} else if ( height ) {
scale = parseInt(100*height/monitor.height);
}
for ( var i = 0, length = monitors.length; i < length; i++ ) {
var monitor = monitors[i];
if ( scale ) {
stream_scale = scale;
} else if ( width ) {
stream_scale = parseInt(100*width/monitor.width);
} else if ( height ) {
stream_scale = parseInt(100*height/monitor.height);
}
var streamImg = $('liveStream'+monitor.id);
if ( streamImg ) {
if ( streamImg.nodeName == 'IMG' ) {