Skip to content

Commit

Permalink
Merge pull request panthernet#1 from DaKaLKa/master
Browse files Browse the repository at this point in the history
+ Fixed: ZoomControl ignores MaxZoom on FitToFill
  • Loading branch information
panthernet committed Feb 24, 2014
2 parents da6201f + ebfd2fb commit 8a9f321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GraphX.Controls/Controls/ZoomControl/ZoomControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ private void DoZoomToFill()
if (_presenter == null)
return;
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);
DoZoomAnimation(deltaZoom, initialTranslate.X * deltaZoom, initialTranslate.Y * deltaZoom);
}
Expand Down

0 comments on commit 8a9f321

Please sign in to comment.