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