Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Nezbritskiy committed Aug 10, 2017
1 parent a8694e4 commit cd450a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Table/Cell.php
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,10 @@ private function _getTextPosX($posX)
{
switch ($this->getTextAlign()) {
case Table::RIGHT:
$x = $posX + $this->width - $this->_text['width'] - $this->paddings[Table::RIGHT] - $this->_getBorderLineWidth(Table::RIGHT) / 2;
$x = $posX + $this->getWidth() + $this->getMargin(self::LEFT) - $this->_text['width'] - $this->paddings[Table::RIGHT] - $this->_getBorderLineWidth(Table::RIGHT);
break;
case Table::CENTER:
$text = $this->_text;
$x = $posX + $this->width / 2 - $this->_text['width'] / 2;
$x = $posX + $this->getWidth() / 2 - $this->_text['width'] / 2;
break;
default: //LEFT
$x = $posX + $this->paddings[Table::LEFT] + $this->_getBorderLineWidth(Table::LEFT) / 2;
Expand Down

0 comments on commit cd450a4

Please sign in to comment.