The map is working quite well now, including the legend. Next steps will be to add the sidemenu.
git-svn-id: file:///svn-source/pmgr/branches/initial_20090526/site@36 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -21,7 +21,7 @@ foreach ($info['palate'] AS &$area) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($info['border']) {
|
||||
if (isset($info['border'])) {
|
||||
// Create border around image
|
||||
imageline($image,
|
||||
0, 0,
|
||||
@@ -68,14 +68,14 @@ foreach ($info['units'] AS $unit) {
|
||||
|
||||
// If the unit is wide enough, run the text horizontal,
|
||||
// otherwise, we'll have to run it vertical.
|
||||
if ($unit['width'] > 100) {
|
||||
imagestring($image, 1,
|
||||
if ($unit['width'] > 40 || ($unit['width'] >= $unit['depth'])) {
|
||||
imagestring($image, $unit['width']/25,
|
||||
$unit['left']+3, $unit['top']+3,
|
||||
$unit['name'],
|
||||
$info['palate']['unit'][$unit['status']]['fg']['color']);
|
||||
}
|
||||
else {
|
||||
imagestringup($image, 1,
|
||||
imagestringup($image, $unit['depth']/25,
|
||||
$unit['left']+3, $unit['bottom']-3,
|
||||
$unit['name'],
|
||||
$info['palate']['unit'][$unit['status']]['fg']['color']);
|
||||
|
||||
Reference in New Issue
Block a user