mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Avalonia: do not coerce default property value
This commit is contained in:
parent
98847f5d86
commit
603a0a7e6f
5 changed files with 21 additions and 20 deletions
|
|
@ -35,8 +35,6 @@ 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 =
|
||||
|
|
@ -420,12 +418,7 @@ namespace MapControl
|
|||
|
||||
private double CoerceZoomLevelProperty(double zoomLevel)
|
||||
{
|
||||
if (zoomLevel != DefaultZoomLevel) // Avalonia: ignore coercing default value
|
||||
{
|
||||
zoomLevel = Math.Min(Math.Max(zoomLevel, MinZoomLevel), MaxZoomLevel);
|
||||
}
|
||||
|
||||
return zoomLevel;
|
||||
return Math.Min(Math.Max(zoomLevel, MinZoomLevel), MaxZoomLevel);
|
||||
}
|
||||
|
||||
private double CoerceHeadingProperty(double heading)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue