From b7c01c9f0fc618bb9ded450c12255b2bb2eb1f6a Mon Sep 17 00:00:00 2001 From: IgorA100 Date: Fri, 13 Feb 2026 21:49:11 +0300 Subject: [PATCH] Moving "monitorsSetScale" function from montage.js to skin.js (montage.js) --- web/skins/classic/views/js/montage.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/web/skins/classic/views/js/montage.js b/web/skins/classic/views/js/montage.js index d8f6f45b2..482609b22 100644 --- a/web/skins/classic/views/js/montage.js +++ b/web/skins/classic/views/js/montage.js @@ -860,33 +860,6 @@ function changeStreamQuality() { monitorsSetScale(); } -function monitorsSetScale(id=null) { - // This function will probably need to be moved to the main JS file, because now used on Watch & Montage pages - id = parseInt(id); - if (id || typeof monitorStream !== 'undefined') { - //monitorStream used on Watch page. - if (typeof monitorStream !== 'undefined') { - var currentMonitor = monitorStream; - } else { - var currentMonitor = monitors.find((o) => { - return parseInt(o["id"]) === id; - }); - } - const el = document.getElementById('liveStream'+id); - const panZoomScale = (panZoomEnabled && zmPanZoom.panZoom[id] ) ? zmPanZoom.panZoom[id].getScale() : 1; - console.log("monitorsSetsCale", id, 'clientWidth', el.clientWidth, 'clientHeight', el.clientHeight, 'panzoomscale', panZoomScale); - currentMonitor.setScale(0, el.clientWidth * panZoomScale + 'px', el.clientHeight * panZoomScale + 'px', {resizeImg: false, streamQuality: $j('#streamQuality').val()}); - } else { - for ( let i = 0, length = monitors.length; i < length; i++ ) { - const id = monitors[i].id; - const el = document.getElementById('liveStream'+id); - const panZoomScale = panZoomEnabled ? zmPanZoom.panZoom[id].getScale() : 1; - monitors[i].setScale(0, parseInt(el.clientWidth * panZoomScale) + 'px', parseInt(el.clientHeight * panZoomScale) + 'px', {resizeImg: false, streamQuality: $j('#streamQuality').val()}); - } - } - setButtonSizeOnStream(); -} - function changeMonitorRate() { const rate = $j('#changeRate').val(); monitorsSetRate(rate);