private void ZoomWithCenterTo(double newZoom, Point zoomCenterInScreenSpace, TransitionSpeed transitionSpeed)
 {
     if (ViewportZoom.IsEqualWithTolerance(newZoom))
     {
         ViewportZoomCommand?.Execute(newZoom, zoomCenterInScreenSpace, transitionSpeed);
     }
 }
Esempio n. 2
0
 private void SetCurrentZoomTypeEnum()
 {
     if (ViewportZoom.IsWithinOnePercent(FitZoomValue))
     {
         _currentZoomTypeEnum = CurrentZoomTypeEnum.Fit;
     }
     else if (ViewportZoom.IsWithinOnePercent(FillZoomValue))
     {
         _currentZoomTypeEnum = CurrentZoomTypeEnum.Fill;
     }
     else
     {
         _currentZoomTypeEnum = CurrentZoomTypeEnum.Other;
     }
 }