Fix Width & Height rotation when scaling. Fixes #2760

This commit is contained in:
Isaac Connor 2019-11-22 12:18:30 -05:00
parent ce44fd52d8
commit ab9f99bdbb
4 changed files with 10 additions and 10 deletions

View File

@ -10,10 +10,10 @@ foreach ( $monitors as $monitor ) {
monitorData[monitorData.length] = { monitorData[monitorData.length] = {
'id': <?php echo $monitor->Id() ?>, 'id': <?php echo $monitor->Id() ?>,
'connKey': <?php echo $monitor->connKey() ?>, 'connKey': <?php echo $monitor->connKey() ?>,
'width': <?php echo $monitor->Width() ?>, 'width': <?php echo $monitor->ViewWidth() ?>,
'height':<?php echo $monitor->Height() ?>, 'height':<?php echo $monitor->ViewHeight() ?>,
'url': '<?php echo $monitor->UrlToIndex() ?>', 'url': '<?php echo $monitor->UrlToIndex() ?>',
'onclick': function(){createPopup( '?view=watch&mid=<?php echo $monitor->Id() ?>', 'zmWatch<?php echo $monitor->Id() ?>', 'watch', <?php echo reScale( $monitor->Width(), $monitor->PopupScale() ); ?>, <?php echo reScale( $monitor->Height(), $monitor->PopupScale() ); ?> );}, 'onclick': function(){createPopup( '?view=watch&mid=<?php echo $monitor->Id() ?>', 'zmWatch<?php echo $monitor->Id() ?>', 'watch', <?php echo reScale( $monitor->ViewWidth(), $monitor->PopupScale() ); ?>, <?php echo reScale( $monitor->ViewHeight(), $monitor->PopupScale() ); ?> );},
'type': '<?php echo $monitor->Type() ?>', 'type': '<?php echo $monitor->Type() ?>',
'refresh': '<?php echo $monitor->Refresh() ?>' 'refresh': '<?php echo $monitor->Refresh() ?>'
}; };

View File

@ -33,10 +33,10 @@ foreach ( $monitors as $monitor ) {
monitorData[monitorData.length] = { monitorData[monitorData.length] = {
'id': <?php echo $monitor->Id() ?>, 'id': <?php echo $monitor->Id() ?>,
'connKey': <?php echo $monitor->connKey() ?>, 'connKey': <?php echo $monitor->connKey() ?>,
'width': <?php echo $monitor->Width() ?>, 'width': <?php echo $monitor->ViewWidth() ?>,
'height':<?php echo $monitor->Height() ?>, 'height':<?php echo $monitor->ViewHeight() ?>,
'url': '<?php echo $monitor->UrlToIndex() ?>', 'url': '<?php echo $monitor->UrlToIndex() ?>',
'onclick': function(){createPopup( '?view=watch&mid=<?php echo $monitor->Id() ?>', 'zmWatch<?php echo $monitor->Id() ?>', 'watch', <?php echo reScale( $monitor->Width(), $monitor->PopupScale() ); ?>, <?php echo reScale( $monitor->Height(), $monitor->PopupScale() ); ?> );}, 'onclick': function(){createPopup( '?view=watch&mid=<?php echo $monitor->Id() ?>', 'zmWatch<?php echo $monitor->Id() ?>', 'watch', <?php echo reScale( $monitor->ViewWidth(), $monitor->PopupScale() ); ?>, <?php echo reScale( $monitor->ViewHeight(), $monitor->PopupScale() ); ?> );},
'type': '<?php echo $monitor->Type() ?>', 'type': '<?php echo $monitor->Type() ?>',
'refresh': '<?php echo $monitor->Refresh() ?>' 'refresh': '<?php echo $monitor->Refresh() ?>'
}; };

View File

@ -184,8 +184,8 @@ foreach ( $monitors as $m ) {
echo " monitorImageURL[" . $m->Id() . "]='".$m->getStreamSrc( array('mode'=>'single','scale'=>$defaultScale*100), '&' )."';\n"; echo " monitorImageURL[" . $m->Id() . "]='".$m->getStreamSrc( array('mode'=>'single','scale'=>$defaultScale*100), '&' )."';\n";
echo " monitorLoadingStageURL[" . $m->Id() . "] = '';\n"; echo " monitorLoadingStageURL[" . $m->Id() . "] = '';\n";
echo " monitorColour[" . $m->Id() . "]=\"" . $m->WebColour() . "\";\n"; echo " monitorColour[" . $m->Id() . "]=\"" . $m->WebColour() . "\";\n";
echo " monitorWidth[" . $m->Id() . "]=" . $m->Width() . ";\n"; echo " monitorWidth[" . $m->Id() . "]=" . $m->ViewWidth() . ";\n";
echo " monitorHeight[" . $m->Id() . "]=" . $m->Height() . ";\n"; echo " monitorHeight[" . $m->Id() . "]=" . $m->ViewHeight() . ";\n";
echo " monitorIndex[" . $m->Id() . "]=" . $numMonitors . ";\n"; echo " monitorIndex[" . $m->Id() . "]=" . $numMonitors . ";\n";
echo " monitorServerId[" . $m->Id() . "]='" .($m->ServerId() ? $m->ServerId() : '0'). "';\n"; echo " monitorServerId[" . $m->Id() . "]='" .($m->ServerId() ? $m->ServerId() : '0'). "';\n";
echo " monitorName[" . $m->Id() . "]=\"" . $m->Name() . "\";\n"; echo " monitorName[" . $m->Id() . "]=\"" . $m->Name() . "\";\n";

View File

@ -46,8 +46,8 @@ var maxDisplayEvents = <?php echo 2 * MAX_EVENTS ?>;
var monitorId = <?php echo $monitor->Id() ?>; var monitorId = <?php echo $monitor->Id() ?>;
var monitorWidth = <?php echo $monitor->Width() ?>; var monitorWidth = <?php echo $monitor->ViewWidth() ?>;
var monitorHeight = <?php echo $monitor->Height() ?>; var monitorHeight = <?php echo $monitor->ViewHeight() ?>;
var monitorUrl = '<?php echo $monitor->UrlToIndex(); ?>'; var monitorUrl = '<?php echo $monitor->UrlToIndex(); ?>';
var monitorType = '<?php echo ( $monitor->Type() ) ?>'; var monitorType = '<?php echo ( $monitor->Type() ) ?>';
var monitorRefresh = '<?php echo ( $monitor->Refresh() ) ?>'; var monitorRefresh = '<?php echo ( $monitor->Refresh() ) ?>';