graphlib MDL-21371: Legend layout issue when different legend texts had different heights.

This commit is contained in:
Tim Hunt
2010-01-18 15:24:19 +00:00
parent 1070f24868
commit d3e2dfaf75
+1 -1
View File
@@ -943,7 +943,7 @@ function init_legend() {
$textWidth = $this->calculated['legend']['boundary_box_max']['width']; // width of largest legend item.
$textHeight = $this->calculated['legend']['boundary_box_max']['height']; // use height as size to use for colour square in legend.
$width = $padding * 2 + $textWidth + $textHeight * 2; // left and right padding + maximum text width + space for square
$height = $padding * ($numSets + 1) + $sumTextHeight; // top and bottom padding + padding between text + text.
$height = ($padding + $textHeight) * $numSets + $padding; // top and bottom padding + padding between text + text.
$this->calculated['legend']['boundary_box_all'] = array('width' => $width,