handle a 0 value for scale

This commit is contained in:
Isaac Connor 2020-02-25 12:14:07 -05:00
parent 4dda37a6ee
commit 8c7d2c5e1a
1 changed files with 8 additions and 6 deletions

View File

@ -57,9 +57,6 @@ if ( isset($_REQUEST['scale']) ) {
$scale = $_COOKIE['zmMontageScale']; $scale = $_COOKIE['zmMontageScale'];
} }
if ( ! $scale )
$scale = 100;
$layouts = ZM\MontageLayout::find(NULL, array('order'=>"lower('Name')")); $layouts = ZM\MontageLayout::find(NULL, array('order'=>"lower('Name')"));
$layoutsById = array(); $layoutsById = array();
foreach ( $layouts as $l ) { foreach ( $layouts as $l ) {
@ -107,7 +104,7 @@ if ( isset($_COOKIE['zmMontageHeight']) and $_COOKIE['zmMontageHeight'] )
else else
$options['height'] = ''; $options['height'] = '';
if ( $scale ) #if ( $scale )
$options['scale'] = $scale; $options['scale'] = $scale;
session_write_close(); session_write_close();
@ -123,7 +120,7 @@ foreach( $displayMonitors as &$row ) {
continue; continue;
$row['Scale'] = $scale; $row['Scale'] = $scale;
$row['PopupScale'] = reScale( SCALE_BASE, $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); $row['PopupScale'] = reScale(SCALE_BASE, $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE);
if ( ZM_OPT_CONTROL && $row['ControlId'] && $row['Controllable'] ) if ( ZM_OPT_CONTROL && $row['ControlId'] && $row['Controllable'] )
$showControl = true; $showControl = true;
@ -203,7 +200,12 @@ if ( $showZones ) {
foreach ( $monitors as $monitor ) { foreach ( $monitors as $monitor ) {
$connkey = $monitor->connKey(); // Minor hack $connkey = $monitor->connKey(); // Minor hack
?> ?>
<div id="monitorFrame<?php echo $monitor->Id() ?>" class="monitorFrame" title="<?php echo $monitor->Id() . ' ' .$monitor->Name() ?>" style="<?php echo $options['width'] ? 'width:'.$options['width'].';':''?>"> <div
id="monitorFrame<?php echo $monitor->Id() ?>"
class="monitorFrame"
title="<?php echo $monitor->Id() . ' ' .$monitor->Name() ?>"
style="<?php echo $options['width'] ? 'width:'.$options['width'].';':''?>"
>
<div id="monitor<?php echo $monitor->Id() ?>" class="monitor idle"> <div id="monitor<?php echo $monitor->Id() ?>" class="monitor idle">
<div <div
id="imageFeed<?php echo $monitor->Id() ?>" id="imageFeed<?php echo $monitor->Id() ?>"