Skip to content

Commit

Permalink
Update field.imagefocusfield.php
Browse files Browse the repository at this point in the history
make sure we don't get negative values
  • Loading branch information
Phill committed Jul 29, 2021
1 parent aa2d073 commit 30fe06a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fields/field.imagefocusfield.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ public function processRawFieldData($data, &$status, &$message = NULL, $simulate
}

$result = array(
'xpos' => $coords[0],
'ypos' => $coords[1]
'xpos' => ((float) $coords[0] < 0) ? "0" : $coords[0],
'ypos' => ((float) $coords[1] < 0) ? "0" : $coords[1]
);

return $result;
Expand Down

0 comments on commit 30fe06a

Please sign in to comment.