diff --git a/web/skins/classic/css/classic/views/montage.css b/web/skins/classic/css/classic/views/montage.css index a59f75d09..55d4da861 100644 --- a/web/skins/classic/css/classic/views/montage.css +++ b/web/skins/classic/css/classic/views/montage.css @@ -26,7 +26,8 @@ vertical-align: middle; } -#monitors .imageFeed img { +#monitors .imageFeed img , +#monitors .imageFeed svg { border: 2px solid #ffffff; } @@ -50,3 +51,23 @@ #monitors .alert .monitorState { border: 0; } +.zones polygon { + fill-opacity: 0.25; +} +.Active { + stroke: #ff0000; + fill: #ff0000; +} +.Inclusive { + stroke: #FFA500; + fill: #FFA500; +} +.Exclusive { + stroke: #800080; + fill: #800080; +} +.Preclusive { + stroke: #0000FF; + fill: #0000FF; +} + diff --git a/web/skins/classic/css/dark/views/montage.css b/web/skins/classic/css/dark/views/montage.css index 0fb50770d..db607522d 100644 --- a/web/skins/classic/css/dark/views/montage.css +++ b/web/skins/classic/css/dark/views/montage.css @@ -27,7 +27,8 @@ vertical-align: middle; } -#monitors .imageFeed img { +#monitors .imageFeed img , +#monitors .imageFeed svg { border: 2px solid #999999; } @@ -52,3 +53,23 @@ border: 0; } +.zones polygon { + fill-opacity: 0.25; +} +.Active { + stroke: #ff0000; + fill: #ff0000; +} +.Inclusive { + stroke: #FFA500; + fill: #FFA500; +} +.Exclusive { + stroke: #800080; + fill: #800080; +} +.Preclusive { + stroke: #0000FF; + fill: #0000FF; +} + diff --git a/web/skins/classic/css/flat/views/montage.css b/web/skins/classic/css/flat/views/montage.css index a9f6f2723..627c535d1 100644 --- a/web/skins/classic/css/flat/views/montage.css +++ b/web/skins/classic/css/flat/views/montage.css @@ -31,7 +31,8 @@ position: relative; } -#monitors .imageFeed img { +#monitors .imageFeed img, +#monitors .imageFeed svg { border: 2px solid #ffffff; margin: 0; padding: 0; @@ -62,7 +63,6 @@ .zones polygon { fill-opacity: 0.25; - stroke-width: 2px; } .Active { stroke: #ff0000; diff --git a/web/skins/classic/views/montage.php b/web/skins/classic/views/montage.php index b7ef8c6f3..8ce638d81 100644 --- a/web/skins/classic/views/montage.php +++ b/web/skins/classic/views/montage.php @@ -34,7 +34,12 @@ if ( !empty($_REQUEST['group']) ) { } $showControl = false; -$showZones = true; +$showZones = false; +if ( isset( $_REQUEST['showZones'] ) ) { + if ( $_REQUEST['showZones'] == 1 ) { + $showZones = true; + } +} $monitors = array(); $widths = array( '' => 'auto', @@ -50,20 +55,18 @@ $heights = array( 480 => 480, ); +$width_scale = $height_scale = $scale = null; + +if ( isset( $_REQUEST['scale'] ) ) + $scale = validInt($_REQUEST['scale']); +else if ( isset( $_COOKIE['zmMontageScale'] ) ) + $scale = $_COOKIE['zmMontageScale']; + foreach( dbFetchAll( $sql ) as $row ) { if ( !visibleMonitor( $row['Id'] ) ) { continue; } - $width_scale = $height_scale = $scale = null; - - if ( isset( $_REQUEST['scale'] ) ) - $scale = validInt($_REQUEST['scale']); - else if ( isset( $_COOKIE['zmMontageScale'] ) ) - $scale = $_COOKIE['zmMontageScale']; - #else - #$scale = reScale( SCALE_BASE, $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); - $row['Scale'] = $scale; $row['PopupScale'] = reScale( SCALE_BASE, $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); @@ -116,6 +119,15 @@ if ( $showControl ) { + Hide Zones + + Show Zones + @@ -141,13 +153,21 @@ foreach ( $monitors as $monitor ) { if ( $showZones ) { $height = null; $width = null; - if ( $options['width'] and ! $options['height'] ) { - $scale = $options['width'] / $monitor->Width(); - $height = $monitor->Height() * $scale; - } else if ( $options['height'] and ! $options['width'] ) { - - $scale = $options['height'] / $monitor->Height(); + if ( $options['width'] ) { + $width = $options['width']; + if ( ! $options['height'] ) { + $scale = (int)( 100 * $options['width'] / $monitor->Width() ); + $height = reScale( $monitor->Height(), $scale ); + } + } else if ( $options['height'] ) { + $height = $options['height']; + if ( ! $options['width'] ) { + $scale = (int)( 100 * $options['height'] / $monitor->Height() ); + $width = reScale( $monitor->Width(), $scale ); + } + } else if ( $scale ) { $width = $monitor->Width() * $scale; + $height = $monitor->Height() * $scale; } $zones = array(); @@ -155,7 +175,6 @@ foreach ( $monitors as $monitor ) { $row['Points'] = coordsToPoints( $row['Coords'] ); if ( $scale ) { -Debug(" Scale: $scale" ); limitPoints( $row['Points'], 0, 0, $monitor->Width(), $monitor->Height() ); scalePoints( $row['Points'], $scale ); } else { @@ -171,7 +190,7 @@ Debug(" Scale: $scale" ); ?> - +