Adding checks for predefined crops that are still set to default and where a specific resize parameter has been passed into GetCropUrl so that output crop is in same ratio as the predefined crop
This commit is contained in:
@@ -81,6 +81,7 @@
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((preferFocalPoint && cropDataSet.HasFocalPoint()) || (crop != null && crop.Coordinates == null && cropDataSet.HasFocalPoint()) || (string.IsNullOrEmpty(cropAlias) && cropDataSet.HasFocalPoint()))
|
||||
{
|
||||
cropUrl.Append("?center=" + cropDataSet.FocalPoint.Top.ToString(CultureInfo.InvariantCulture) + "," + cropDataSet.FocalPoint.Left.ToString(CultureInfo.InvariantCulture));
|
||||
@@ -100,6 +101,7 @@
|
||||
cropUrl.Append("?anchor=center");
|
||||
cropUrl.Append("&mode=crop");
|
||||
}
|
||||
|
||||
return cropUrl.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user