protected override float ComputeContentHeight() { AwesomeLayoutBox ptr = firstChild; float retn = 0f; while (ptr != null) { LayoutSize size = default; ptr.GetHeights(ref size); float clampedHeight = size.Clamped + size.marginStart + size.marginEnd; if (clampedHeight > retn) { retn = clampedHeight; } ptr = ptr.nextSibling; } return(retn); }
public override void RunLayoutVertical(int frameId) { AwesomeLayoutBox ptr = firstChild; float contentAreaHeight = finalHeight - (paddingBorderVerticalStart + paddingBorderVerticalEnd); float alignment = element.style.AlignItemsVertical; float inset = paddingBorderVerticalStart; while (ptr != null) { LayoutSize size = default; ptr.GetHeights(ref size); float clampedHeight = size.Clamped; float y = inset + size.marginStart; float originBase = y; float originOffset = contentAreaHeight * alignment; float alignedPosition = originBase + originOffset + (clampedHeight * -alignment); ptr.ApplyLayoutVertical(y, alignedPosition, size, clampedHeight, contentAreaHeight, LayoutFit.None, frameId); ptr = ptr.nextSibling; } }