Bug 330 - Fixed problem with zone resizing on monitor resizing.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1968 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
8a49cf7e12
commit
1ef6b35bf1
|
@ -1221,8 +1221,8 @@ if ( !empty($action) )
|
|||
$points = coordsToPoints( $zone['Coords'] );
|
||||
for ( $i = 0; $i < count($points); $i++ )
|
||||
{
|
||||
$points[$i]['x'] = intval(round((($points[$i]['x']*$new_w)/$old_w)));
|
||||
$points[$i]['y'] = intval(round((($points[$i]['y']*$new_h)/$old_h)));
|
||||
$points[$i]['x'] = intval(($points[$i]['x']*($new_w-1))/($old_w-1));
|
||||
$points[$i]['y'] = intval(($points[$i]['y']*($new_h-1))/($old_h-1));
|
||||
}
|
||||
$new_zone['Coords'] = pointsToCoords( $points );
|
||||
$new_zone['Area'] = intval(round(($zone['Area']*$new_a)/$old_a));
|
||||
|
|
Loading…
Reference in New Issue