Fixed zooming out

This commit is contained in:
MarcinZiabek
2022-03-24 13:54:38 +01:00
parent d24d887a3a
commit e430484e85
+2 -2
View File
@@ -62,14 +62,14 @@ class InteractiveCanvas : ICustomDrawOperation
private void LimitTranslate()
{
if (TotalPagesHeight * Scale > Height)
if (TotalPagesHeight > Height / Scale)
{
TranslateY = Math.Min(TranslateY, MaxTranslateY);
TranslateY = Math.Max(TranslateY, 0);
}
else
{
TranslateY = -TotalPagesHeight / 2;
TranslateY = (TotalPagesHeight - Height / Scale) / 2;
}
if (Width / Scale < MaxWidth)