Bug 83: Fixed broken number of columns in montage mode.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1456 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
978aeb5505
commit
87cafe0417
|
@ -78,9 +78,8 @@ while( $row = mysql_fetch_assoc( $result ) )
|
||||||
}
|
}
|
||||||
$monitors[] = $row = array_merge( $row, $row2, $row3 );
|
$monitors[] = $row = array_merge( $row, $row2, $row3 );
|
||||||
}
|
}
|
||||||
$max_cols = 8;
|
$montage_rows = intval((($cycle_count-1)/ZM_WEB_MONTAGE_MAX_COLS)+1);
|
||||||
$montage_cols = (int)(($cycle_count+1)/((int)(($cycle_count-1)/ZM_WEB_MONTAGE_MAX_COLS)+1));
|
$montage_cols = intval(ceil($cycle_count/$montage_rows));
|
||||||
$montage_rows = intval(ceil($cycle_count/$montage_cols));
|
|
||||||
|
|
||||||
$montage_width = ZM_WEB_MONTAGE_WIDTH?ZM_WEB_MONTAGE_WIDTH:$max_width;
|
$montage_width = ZM_WEB_MONTAGE_WIDTH?ZM_WEB_MONTAGE_WIDTH:$max_width;
|
||||||
$montage_height = ZM_WEB_MONTAGE_HEIGHT?ZM_WEB_MONTAGE_HEIGHT:$max_height;
|
$montage_height = ZM_WEB_MONTAGE_HEIGHT?ZM_WEB_MONTAGE_HEIGHT:$max_height;
|
||||||
|
|
|
@ -48,10 +48,8 @@ while( $row = mysql_fetch_assoc( $result ) )
|
||||||
$monitors[] = $row;
|
$monitors[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
$max_cols = 8;
|
$rows = intval(((count($monitors)-1)/ZM_WEB_MONTAGE_MAX_COLS)+1);
|
||||||
$cols = (int)((count($monitors)+1)/((int)((count($monitors)-1)/ZM_WEB_MONTAGE_MAX_COLS)+1));
|
$cols = intval(ceil(count($monitors)/$rows));
|
||||||
$rows = intval(ceil(count($monitors)/$cols));
|
|
||||||
$last_cols = count($monitors)%$rows;
|
|
||||||
|
|
||||||
$widths = array();
|
$widths = array();
|
||||||
$heights = array();
|
$heights = array();
|
||||||
|
|
Loading…
Reference in New Issue