mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-19 12:06:29 -04:00
Fix: scale calculation with "scale == 'fit_to_width'" watch.js
If scale == 'fit_to_width', then it is necessary to take into account the width of the screen, not the monitor element, because The monitor has not yet reached the correct size.
This commit is contained in:
@@ -1334,8 +1334,8 @@ function monitorsSetScale(id=null) {
|
||||
} else if (scale == 'fit_to_width') {
|
||||
//Fit to screen width
|
||||
resize = false;
|
||||
width = parseInt(el.clientWidth * panZoomScale) + 'px';
|
||||
height = parseInt(el.clientHeight * panZoomScale) + 'px';
|
||||
width = parseInt(window.innerWidth * panZoomScale) + 'px';
|
||||
height = 'auto';
|
||||
}
|
||||
|
||||
if (resize) {
|
||||
@@ -1380,8 +1380,8 @@ function monitorsSetScale(id=null) {
|
||||
} else if (scale == 'fit_to_width') {
|
||||
//Fit to screen width
|
||||
resize = false;
|
||||
width = parseInt(el.clientWidth * panZoomScale) + 'px';
|
||||
height = parseInt(el.clientHeight * panZoomScale) + 'px';
|
||||
width = parseInt(window.innerWidth * panZoomScale) + 'px';
|
||||
height = 'auto';
|
||||
}
|
||||
|
||||
if (resize) {
|
||||
|
||||
Reference in New Issue
Block a user