Permalink
Browse files

graphlib MDL-21371: Legend layout issue when different legend texts h…

…ad different heights.
  • Loading branch information...
1 parent 1070f24 commit d3e2dfaf75d44934180e4feb205eb68e47a9ca88 @timhunt timhunt committed Jan 18, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/graphlib.php
View
@@ -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,

0 comments on commit d3e2dfa

Please sign in to comment.