From 41a92e11ad4b7b044451a128b7f44500fe99cca4 Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Tue, 21 May 2024 19:34:06 +0300 Subject: [PATCH] Fix: block "Ratio Control" is created only for Montage page (Monitor.php) Otherwise there will be an error in the browser console that the "changeRatio" function was not found --- web/includes/Monitor.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/includes/Monitor.php b/web/includes/Monitor.php index edaa60a50..dcfe9be70 100644 --- a/web/includes/Monitor.php +++ b/web/includes/Monitor.php @@ -972,6 +972,8 @@ public static function getStatuses() { * Same width height. If both are set we should calculate the smaller resulting scale */ function getStreamHTML($options) { + global $basename; + if (isset($options['scale']) and $options['scale'] != '' and $options['scale'] != 'fixed') { if ($options['scale'] != 'auto' && $options['scale'] != '0') { $options['width'] = reScale($this->ViewWidth(), $options['scale']).'px'; @@ -1021,10 +1023,11 @@ public static function getStatuses() { if ($this->StreamReplayBuffer()) $options['buffer'] = $this->StreamReplayBuffer(); //Warning("width: " . $options['width'] . ' height: ' . $options['height']. ' scale: ' . $options['scale'] ); + $blockRatioControl = ($basename == "montage") ? '' : ''; $html = '
- + ' . $blockRatioControl . '