The fact that focal point typically uses relative coordinates to represent itself and crop API uses absolute coordinates has led to a bit of confusion. Lets improve the documentation in FocalPointManagerInterface to make this less confusing for users

ORIGINAL SUMMARY (@dave reid)
I also found the docs for \Drupal\focal_point\FocalPointManagerInterface::saveCropEntity confusing because the X and Y coordinates are relative like a percentage, and not the actual X and Y coordinates.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid created an issue. See original summary.

Dave Reid’s picture

Status: Active » Needs review
FileSize
836 bytes
bleen’s picture

Title: X and Y arguments in FocalPointManagerInterface::saveCropEntity() are confusing. » X and Y arguments in FocalPointManagerInterface are confusing.
Issue summary: View changes
FileSize
3.61 KB

I slightly broadened the scope of this issue to include all the comments in FocalPointManagerInterface since a person who finds the saveCropEntity docs confusing is likely to find all the docs confusing for roughly the same reason.

bleen’s picture

Status: Needs review » Fixed

I think this is objectively an improvement in the docs and there is no risk of anything breaking since there are no code changes .... committing

  • bleen committed 920b68e on 8.x-1.x
    Issue #2856994 by Dave Reid, bleen: X and Y arguments in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.