From e42e838721b5fd64acb2c49e71d09ee641c22b4c Mon Sep 17 00:00:00 2001 From: Emmanuel Hansen Date: Fri, 5 May 2023 11:44:54 +0000 Subject: [PATCH] add missing comments --- .../Utils/RealizedWrappedElements.cs | 12 ++++++++---- src/Avalonia.Controls/VirtualizingWrapPanel.cs | 5 ++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Avalonia.Controls/Utils/RealizedWrappedElements.cs b/src/Avalonia.Controls/Utils/RealizedWrappedElements.cs index 29b86b2aa3..a94296715a 100644 --- a/src/Avalonia.Controls/Utils/RealizedWrappedElements.cs +++ b/src/Avalonia.Controls/Utils/RealizedWrappedElements.cs @@ -7,7 +7,7 @@ namespace Avalonia.Controls.Utils { /// /// Stores the realized element state for a virtualizing panel that arranges its children - /// in a stack layout, wrapping around when layout reaches the end, such as . + /// in a stack layout, continuing on the next line when layout reaches the end, such as . /// internal class RealizedWrappedElements { @@ -39,13 +39,17 @@ namespace Avalonia.Controls.Utils public IReadOnlyList Elements => _elements ??= new List(); /// - /// Gets the sizes of the elements on the primary axis. + /// Gets the sizes of the elements. /// public IReadOnlyList SizeUV => _sizes ??= new List(); + + /// + /// Gets the positions of the elements. + /// public IReadOnlyList PositionsUV => _positions ??= new List(); /// - /// Gets the position of the first element on the primary axis. + /// Gets the position of the first element. /// public UVSize StartUV => _startUV; @@ -56,7 +60,7 @@ namespace Avalonia.Controls.Utils /// The element. /// The position of the elemnt. /// The size of the element. - public void Add(int index, Control element, Orientation orientation, UVSize uv, UVSize sizeUV) + public void Add(int index, Control element, UVSize uv, UVSize sizeUV) { if (index < 0) throw new ArgumentOutOfRangeException(nameof(index)); diff --git a/src/Avalonia.Controls/VirtualizingWrapPanel.cs b/src/Avalonia.Controls/VirtualizingWrapPanel.cs index 6fad762770..66e32275d0 100644 --- a/src/Avalonia.Controls/VirtualizingWrapPanel.cs +++ b/src/Avalonia.Controls/VirtualizingWrapPanel.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Collections.Specialized; -using System.Data; using System.Diagnostics; using System.Linq; using Avalonia.Controls.Utils; @@ -578,7 +577,7 @@ namespace Avalonia.Controls uv.V = v; } - _measureElements!.Add(index, e, Orientation, uv, size); + _measureElements!.Add(index, e, uv, size); uv = new UVSize(Orientation) { @@ -625,7 +624,7 @@ namespace Avalonia.Controls uv.V -= size.V; } - _measureElements!.Add(index, e, Orientation, uv, size); + _measureElements!.Add(index, e, uv, size); --index; }