mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-24 06:27:07 -04:00
Merge pull request #4658 from IgorA100/patch-998471
Fix: Don't assign "resize" listener when using Observer (zone.js)
This commit is contained in:
@@ -716,9 +716,11 @@ function initPage() {
|
||||
imageFeed.appendChild(zoneSVG);
|
||||
}
|
||||
|
||||
var ro = new ResizeObserver(drawZonePoints);
|
||||
ro.observe(imageFeed);
|
||||
window.addEventListener("resize", drawZonePoints, {passive: true});
|
||||
if (imageFeed) {
|
||||
(new ResizeObserver(drawZonePoints)).observe(imageFeed);
|
||||
} else {
|
||||
window.addEventListener("resize", drawZonePoints, {passive: true});
|
||||
}
|
||||
drawZonePoints();
|
||||
|
||||
// Manage the BACK button
|
||||
@@ -745,7 +747,6 @@ function panZoomOut(el) {
|
||||
zmPanZoom.zoomOut(el);
|
||||
}
|
||||
|
||||
|
||||
function Polygon_calcArea(coords) {
|
||||
var n_coords = coords.length;
|
||||
var float_area = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user