From 7b5ee86ee880080f66cb5c00f1c743b9f0081b95 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 10 Apr 2022 18:54:01 -0400 Subject: [PATCH] Move svg zone display into Monitor->getStreamHTML. Remove most of it because scaling is now automatic. Move styling to css --- web/includes/Monitor.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/web/includes/Monitor.php b/web/includes/Monitor.php index d9dc9bef2..ee7b437ce 100644 --- a/web/includes/Monitor.php +++ b/web/includes/Monitor.php @@ -8,6 +8,7 @@ require_once('Manufacturer.php'); require_once('Model.php'); require_once('Server.php'); require_once('Storage.php'); +require_once('Zone.php'); class Monitor extends ZM_Object { protected static $FunctionTypes = null; @@ -926,6 +927,17 @@ public static function getStatuses() { (isset($options['height']) ? $options['height'] : null), $this->Name()); } + + if ($options['zones']) { + $html .= ''.PHP_EOL; + foreach (Zone::find(array('MonitorId'=>$this->Id()), array('order'=>'Area DESC')) as $zone) { + $html .= $zone->svg_polygon(); + } // end foreach zone + $html .= ' + Sorry, your browser does not support inline SVG + +'; + } # end if showZones $html .= PHP_EOL.''.PHP_EOL; if (isset($options['state']) and $options['state']) { //if ((!ZM_WEB_COMPACT_MONTAGE) && ($this->Type() != 'WebSite')) {