From 371900a592b7b65578550db8199fd907c363d698 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 24 Apr 2017 14:45:13 -0400 Subject: [PATCH] Updating the title and dates height for pdf. In the pdf have to see if either the title or date is more than one line. If it is then adjust the next Y position for the start of the address. This is so the address doesn't overlap the title. --- models/front/events/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/models/front/events/list.php b/models/front/events/list.php index e6d39e5..34ffd0e 100644 --- a/models/front/events/list.php +++ b/models/front/events/list.php @@ -462,16 +462,16 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction $title->setText(html_entity_decode( $event['name'], ENT_HTML5 ) ); //$title->setAlign('center'); $title->setWidth(self::TITLE_WIDTH); - $lineCount = $title->getLineCount(); - if ( $title->getLineCount() > 1 ) { + $lineCountTitle = $title->getLineCount() - 1; + if ( $lineCountTitle ) { $pdfY -= $title->getLineHeight(); } $title->draw($page->getCanvas(), self::PDF_RGT_COL_X, $pdfY); - if ( $title->getLineCount() > 1 ) { - $pdfY += $title->getLineHeight(); - } $pdfY -= self::LINE_HEIGHT; + if ( $lineCountTitle ) { + $pdfY -= $title->getLineCount(); + } if ( $lineCount ) { $pdfY -= $dateHeight; } -- 2.17.1