- Issue created by @itsruanduplessis
Im trying to get the Scale and Crop image style to work with Acquia DAM images, but I noticed that int the "EmbedCodeUrlBuilder.php" file we sets the "focal_point_scale_and_crop" case without an anchor parameter - which means the focal point is ignored:
case 'focal_point_scale_and_crop':
$values['crop'] = 'yes';
$values['w'] = $effect['data']['width'];
$values['h'] = $effect['data']['height'];
break;
Instead, the anchor point is added within the "focal_point_crop" case:
case 'focal_point_crop':
if (isset($effect['data']['crop_type'])) {
...
$position = $crop->position();
$values['crop'] = 'yes';
$values['w'] = $crop_width;
$values['h'] = $crop_height;
// anchor tag set here
$values['a'] =
self::calculateAnchorPointForWiden($position['x'], $crop_width, $calculated_with)
. ','
. self::calculateAnchorPointForWiden($position['y'], $crop_height, $calculated_height);
}
break;
Looks like its been like this for years, so I'm not sure if its an issue or if I'm missing something. Does anyone know why "focal_point_scale_and_crop" omits the anchor parameter?
Active
1.1
Code