mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Avalonia: ignore coercing default ZoomLevel value
This commit is contained in:
parent
35c0076336
commit
98847f5d86
4 changed files with 19 additions and 12 deletions
|
|
@ -35,6 +35,8 @@ namespace MapControl
|
|||
/// </summary>
|
||||
public partial class MapBase : MapPanel
|
||||
{
|
||||
private const double DefaultZoomLevel = 1d;
|
||||
|
||||
public static TimeSpan ImageFadeDuration { get; set; } = TimeSpan.FromSeconds(0.1);
|
||||
|
||||
public static readonly DependencyProperty AnimationDurationProperty =
|
||||
|
|
@ -418,7 +420,12 @@ namespace MapControl
|
|||
|
||||
private double CoerceZoomLevelProperty(double zoomLevel)
|
||||
{
|
||||
return Math.Min(Math.Max(zoomLevel, MinZoomLevel), MaxZoomLevel);
|
||||
if (zoomLevel != DefaultZoomLevel) // Avalonia: ignore coercing default value
|
||||
{
|
||||
zoomLevel = Math.Min(Math.Max(zoomLevel, MinZoomLevel), MaxZoomLevel);
|
||||
}
|
||||
|
||||
return zoomLevel;
|
||||
}
|
||||
|
||||
private double CoerceHeadingProperty(double heading)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue