forked from amkovkov/GranuSightSoftware2
fix: typos
TOO many typos
This commit is contained in:
@@ -11,7 +11,7 @@ using Avalonia.Media;
|
||||
using Avalonia.Styling;
|
||||
using Avalonia.Threading;
|
||||
|
||||
using GSS2.Core.Extentions;
|
||||
using GSS2.Core.Extensions;
|
||||
|
||||
namespace GSS2.UI.Core;
|
||||
|
||||
@@ -91,7 +91,7 @@ public class SectionPanel : Panel
|
||||
}
|
||||
|
||||
|
||||
private readonly Dictionary<Control, int> _childIndeces = new Dictionary<Control, int>();
|
||||
private readonly Dictionary<Control, int> _childIndices = new Dictionary<Control, int>();
|
||||
private bool _initialized = false;
|
||||
private int _previousIndex = 0;
|
||||
|
||||
@@ -135,9 +135,9 @@ public class SectionPanel : Panel
|
||||
|
||||
if (_initialized)
|
||||
{
|
||||
_childIndeces.Clear();
|
||||
_childIndices.Clear();
|
||||
foreach (var (i, child) in Children.Enumerate())
|
||||
_childIndeces.Add(child, i);
|
||||
_childIndices.Add(child, i);
|
||||
}
|
||||
}
|
||||
panel.InvalidateArrange();
|
||||
@@ -272,7 +272,7 @@ public class SectionPanel : Panel
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var (child, i) in _childIndeces)
|
||||
foreach (var (child, i) in _childIndices)
|
||||
{
|
||||
var transform = child.RenderTransform as TranslateTransform;
|
||||
if (transform is null)
|
||||
@@ -303,13 +303,13 @@ public class SectionPanel : Panel
|
||||
if (!_initialized)
|
||||
{
|
||||
foreach (var (i, child) in Children.Enumerate())
|
||||
_childIndeces.Add(child, i);
|
||||
_childIndices.Add(child, i);
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
if (_previousIndex == CurrentIndex)
|
||||
{
|
||||
foreach (var (child, i) in _childIndeces)
|
||||
foreach (var (child, i) in _childIndices)
|
||||
{
|
||||
var rect = Orientation switch
|
||||
{
|
||||
@@ -334,27 +334,27 @@ public class SectionPanel : Panel
|
||||
{
|
||||
int indexSingleShift = indexShift / Math.Abs(indexShift);
|
||||
|
||||
var firstIndex = _childIndeces.Min(ch => ch.Value);
|
||||
var lastIndex = _childIndeces.Max(ch => ch.Value);
|
||||
var firstIndex = _childIndices.Min(ch => ch.Value);
|
||||
var lastIndex = _childIndices.Max(ch => ch.Value);
|
||||
|
||||
if (indexSingleShift == -1 &&
|
||||
_previousIndex - 1 < firstIndex)
|
||||
{
|
||||
var newIndex = firstIndex - 1;
|
||||
var (child, _) = _childIndeces.MaxBy(ch => ch.Value);
|
||||
var (child, _) = _childIndices.MaxBy(ch => ch.Value);
|
||||
InstantTransform(child, -Children.Count(), size);
|
||||
|
||||
_childIndeces[child] = newIndex;
|
||||
_childIndices[child] = newIndex;
|
||||
}
|
||||
|
||||
if (indexSingleShift == 1 &&
|
||||
_previousIndex + 1 > lastIndex)
|
||||
{
|
||||
var newIndex = lastIndex + 1;
|
||||
var (child, _) = _childIndeces.MinBy(ch => ch.Value);
|
||||
var (child, _) = _childIndices.MinBy(ch => ch.Value);
|
||||
InstantTransform(child, Children.Count(), size);
|
||||
|
||||
_childIndeces[child] = newIndex;
|
||||
_childIndices[child] = newIndex;
|
||||
}
|
||||
|
||||
List<Task> animations = new List<Task>();
|
||||
|
||||
Reference in New Issue
Block a user