forked from amkovkov/GranuSightSoftware2
fix: typos
TOO many typos
This commit is contained in:
@@ -3,13 +3,13 @@ using Avalonia.Media;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Controls;
|
||||
|
||||
using GSS2.Core.Extentions;
|
||||
using GSS2.Core.UI.Extensions;
|
||||
|
||||
namespace GSS2.UI.Core;
|
||||
|
||||
public class ZoomPanImage : Control
|
||||
{
|
||||
private Point? _lastmousePosition = null;
|
||||
private Point? _lastMousePosition = null;
|
||||
private Dictionary<int, Point>? _lastTouchPositions = null;
|
||||
private float _zoom = 1;
|
||||
private float _panX = 0;
|
||||
@@ -103,7 +103,7 @@ public class ZoomPanImage : Control
|
||||
_panY = 0f;
|
||||
}
|
||||
else
|
||||
_lastmousePosition = ea.GetPosition(this);
|
||||
_lastMousePosition = ea.GetPosition(this);
|
||||
}
|
||||
}
|
||||
else if (ea.Pointer.Type == PointerType.Touch)
|
||||
@@ -124,7 +124,7 @@ public class ZoomPanImage : Control
|
||||
if (ea.Pointer.Type == PointerType.Mouse)
|
||||
{
|
||||
if (!ea.Properties.IsLeftButtonPressed)
|
||||
_lastmousePosition = null;
|
||||
_lastMousePosition = null;
|
||||
}
|
||||
else if (ea.Pointer.Type == PointerType.Touch)
|
||||
{
|
||||
@@ -138,15 +138,15 @@ public class ZoomPanImage : Control
|
||||
{
|
||||
if (ea.Pointer.Type == PointerType.Mouse)
|
||||
{
|
||||
if (_lastmousePosition is null || _zoom == 1) // Если кнопка не нажата или зум == 1, то ничего не делаем
|
||||
if (_lastMousePosition is null || _zoom == 1) // Если кнопка не нажата или зум == 1, то ничего не делаем
|
||||
{
|
||||
base.OnPointerMoved(ea);
|
||||
return;
|
||||
}
|
||||
var position = ea.GetPosition(this);
|
||||
_panX -= (float)(_lastmousePosition.Value.X - position.X);
|
||||
_panY -= (float)(_lastmousePosition.Value.Y - position.Y);
|
||||
_lastmousePosition = position;
|
||||
_panX -= (float)(_lastMousePosition.Value.X - position.X);
|
||||
_panY -= (float)(_lastMousePosition.Value.Y - position.Y);
|
||||
_lastMousePosition = position;
|
||||
}
|
||||
else if (ea.Pointer.Type == PointerType.Touch)
|
||||
{
|
||||
@@ -163,11 +163,11 @@ public class ZoomPanImage : Control
|
||||
return;
|
||||
}
|
||||
|
||||
if (_lastTouchPositions.Count() == 1 && _zoom != 1) // Если есть только одно прикосновение и зум != 1, то токлько перемещение
|
||||
if (_lastTouchPositions.Count() == 1 && _zoom != 1) // Если есть только одно прикосновение и зум != 1, то только перемещение
|
||||
{
|
||||
var position = ea.GetPosition(this);
|
||||
_panX -= (float)(_lastTouchPositions[ea.Pointer.Id].X - position.X);
|
||||
_panY -= (float)(_lastTouchPositions[ea.Pointer.Id].Y - position.Y); // Ось Y инвертированна
|
||||
_panY -= (float)(_lastTouchPositions[ea.Pointer.Id].Y - position.Y); // Ось Y инвертирована
|
||||
_lastTouchPositions[ea.Pointer.Id] = position;
|
||||
}
|
||||
else if (_lastTouchPositions.Count() == 2) // Если два прикосновения, то перемещение с приближением
|
||||
|
||||
Reference in New Issue
Block a user