Skip to content

Commit

Permalink
Merge pull request Intervention#792 from billmn/patch-1
Browse files Browse the repository at this point in the history
Fix “insert” offset with center position
  • Loading branch information
olivervogel authored Jul 6, 2021
2 parents 936ec68 + e8073ae commit a2d7238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Intervention/Image/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ public function align($position, $offset_x = 0, $offset_y = 0)
case 'middle':
case 'center-center':
case 'middle-middle':
$x = intval($this->width / 2);
$y = intval($this->height / 2);
$x = intval($this->width / 2) + $offset_x;
$y = intval($this->height / 2) + $offset_y;
break;

default:
Expand Down

0 comments on commit a2d7238

Please sign in to comment.