mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-24 08:41:40 -04:00
When zone coordinates are stored as pixel values (e.g. from a missed DB migration), the web layer now detects values > 100 and converts them to percentages using the monitor's dimensions, mirroring the existing C++ detection logic in zm_zone.cpp. This prevents limitPoints() from clamping pixel values to 0-100 and zones rendering incorrectly in SVG overlays. - Add convertPixelPointsToPercent() helper in functions.php - Call conversion before limitPoints() in zone.php and zones.php - Update Zone::svg_polygon() to accept monitor dimensions and convert - Pass ViewWidth/ViewHeight to svg_polygon() from Monitor::getStreamHTML() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>