зеркало из https://github.com/stride3d/GraphX.git
+ Fixed: ZoomControl ignores MaxZoom on FitToFill
This commit is contained in:
Родитель
da6201fde5
Коммит
ebfd2fb69f
|
@ -1396,7 +1396,7 @@ namespace GraphX.Controls
|
||||||
if (_presenter == null)
|
if (_presenter == null)
|
||||||
return;
|
return;
|
||||||
var c = IsContentGraphArea ? GraphAreaContent.ContentSize.Size : ContentVisual.DesiredSize;
|
var c = IsContentGraphArea ? GraphAreaContent.ContentSize.Size : ContentVisual.DesiredSize;
|
||||||
var deltaZoom = Math.Min( ActualWidth / (c.Width), ActualHeight / (c.Height));
|
var deltaZoom = Math.Min(MaxZoom,Math.Min( ActualWidth / (c.Width), ActualHeight / (c.Height)));
|
||||||
var initialTranslate = IsContentGraphArea ? GetGraphTranslate() : GetInitialTranslate(c.Width, c.Height);
|
var initialTranslate = IsContentGraphArea ? GetGraphTranslate() : GetInitialTranslate(c.Width, c.Height);
|
||||||
DoZoomAnimation(deltaZoom, initialTranslate.X * deltaZoom, initialTranslate.Y * deltaZoom);
|
DoZoomAnimation(deltaZoom, initialTranslate.X * deltaZoom, initialTranslate.Y * deltaZoom);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче