diff --git a/web/skins/classic/views/zones.php b/web/skins/classic/views/zones.php index 5d16cf7be..8c9b0a9d0 100644 --- a/web/skins/classic/views/zones.php +++ b/web/skins/classic/views/zones.php @@ -65,6 +65,14 @@ echo getNavBarHTML(); foreach ( dbFetchAll('SELECT * FROM Zones WHERE MonitorId=? ORDER BY Area DESC', NULL, array($mid)) as $row ) { $row['Points'] = coordsToPoints($row['Coords']); + $row['OutOfBounds'] = false; + foreach ($row['Points'] as $point) { + if ($point['x'] < $minX || $point['x'] > $maxX || $point['y'] < $minY || $point['y'] > $maxY) { + $row['OutOfBounds'] = true; + break; + } + } + limitPoints($row['Points'], $minX, $minY, $maxX, $maxY); $row['Coords'] = pointsToCoords($row['Points']); $row['AreaCoords'] = preg_replace('/\s+/', ',', $row['Coords']); @@ -91,7 +99,11 @@ echo getNavBarHTML(); foreach ($zones as $zone) { ?> - + ViewWidth().'x'.$monitor->ViewHeight().'). Points have been clamped.').'"> '; + } + ?>  / ViewWidth()*$monitor->ViewHeight()) ) ?> disabled="disabled"/>