Sdl.Web.Mvc/Html/BaseMediaHelper.cs
/// <summary>
/// Calulated the responsive media height based on client display size and pixel ration, grid container size, width factor and aspect ratio. 
/// </summary>
/// <param name="widthFactor">The width factor</param>
/// <param name="aspect">The aspect ratio</param>
/// <param name="containerSize">The grid container size containing the media (in grid units)</param>
/// <returns>The optimal media height</returns>
Calulated the responsive media height based on client display size and pixel ration, grid container size, width factor and aspect ratio.
Calulated the responsive media height based on client display size and pixel ration grid container size width factor and aspect ratio .
public virtual int GetResponsiveHeight(string widthFactor, double aspect, int containerSize = 0)
        {
            int width = GetResponsiveWidth(widthFactor, containerSize);
            return (int)Math.Ceiling(width / aspect);
        }
public virtual int GetResponsiveHeight ( string widthFactor , double aspect , int containerSize = 0 ) { int width = GetResponsiveWidth ( widthFactor , containerSize ) ; return ( int ) Math . Ceiling ( width / aspect ) ; }
Calulated the responsive media height based on client display size and pixel ration, grid container size, width factor and aspect ratio.
Calulated the responsive media height based on client display size and pixel ration grid container size width factor and aspect ratio .
The optimal media height
The optimal media height
widthFactor
string
The width factor
The width factor
aspect
double
The aspect ratio
The aspect ratio
containerSize
int
The grid container size containing the media (in grid units)
The grid container size containing the media ( in grid units )