fix zone editing globals and inputs being too big

This commit is contained in:
Isaac Connor 2020-08-06 12:24:51 -04:00
parent 8533ce7018
commit a001c93321
3 changed files with 35 additions and 3 deletions

View File

@ -4,11 +4,13 @@
}
#settingsPanel,
#zonePoints {
width: 600px;
max-width: 600px;
width: 50%;
}
#zoneSettings {
border-collapse: collapse;
width: 100%;
}
#zoneSettings th,
@ -132,5 +134,22 @@ width: 100%;
input[name="newAlarmRgbR"],
input[name="newAlarmRgbG"],
input[name="newAlarmRgbB"] {
width: 30%;
width: 25%;
}
input[name="newZone[MinPixelThreshold]"],
input[name="newZone[MaxPixelThreshold]"],
input[name="newZone[FilterX]"],
input[name="newZone[FilterY]"],
input[name="newZone[MinFilterPixels]"],
input[name="newZone[MaxFilterPixels]"],
input[name="newZone[MinBlobPixels]"],
input[name="newZone[MaxBlobPixels]"],
input[name="newZone[MinBlobs]"],
input[name="newZone[MaxBlobs]"],
input[name="newZone[MinAlarmPixels]"],
input[name="newZone[MaxAlarmPixels]"] {
width: 90px;
}
input.ZonePoint {
width: 75px;
}

View File

@ -450,6 +450,7 @@ function drawZonePoints() {
'name': 'newZone[Points]['+i+'][x]',
'value': zone['Points'][i].x,
'type': 'number',
'class': 'ZonePoint',
'min': '0',
'max': maxX,
'data-point-index': i
@ -464,6 +465,7 @@ function drawZonePoints() {
'name': 'newZone[Points]['+i+'][y]',
'value': zone['Points'][i].y,
'type': 'number',
'class': 'ZonePoint',
'min': '0',
'max': maxY,
'data-point-index': i

View File

@ -1,3 +1,14 @@
<?php
global $presets;
global $zone;
global $newZone;
global $monitor;
global $selfIntersecting;
global $streamMode;
global $connkey;
global $streamSrc;
?>
var presets = new Object();
<?php
foreach ( $presets as $preset ) {
@ -21,7 +32,7 @@ presets[<?php echo $preset['Id'] ?>] = {
'ExtendAlarmFrames': '<?php echo $preset['ExtendAlarmFrames'] ?>'
};
<?php
}
} # end foreach preset
?>
var zone = {