Skip to content

Commit

Permalink
fix: Default opacity to 1 for all annotation opacity properties
Browse files Browse the repository at this point in the history
  • Loading branch information
tuyen-vuduc committed Aug 21, 2024
1 parent 53f7cd6 commit 17d117c
Show file tree
Hide file tree
Showing 7 changed files with 403 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/libs/Mapbox.Maui/Mapbox.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<RepositoryUrl>https://github.com/tuyen-vuduc/mapbox-maui</RepositoryUrl>
<PackageProjectUrl>https://mapbox.tuyen-vuduc.tech</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageVersion>11.5.1-alpha04</PackageVersion>
<PackageVersion>11.5.1-alpha05</PackageVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tv-mapbox.png</PackageIcon>
Expand Down
4 changes: 2 additions & 2 deletions src/libs/Mapbox.Maui/Models/Annotations/CircleAnnotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public double? CircleOpacity
{
get
{
return GetProperty<double?>("circle-opacity", default);
return GetProperty<double?>("circle-opacity", 1);
}
set
{
Expand Down Expand Up @@ -92,7 +92,7 @@ public double? CircleStrokeOpacity
{
get
{
return GetProperty<double?>("circle-stroke-opacity", default);
return GetProperty<double?>("circle-stroke-opacity", 1);
}
set
{
Expand Down
4 changes: 2 additions & 2 deletions src/libs/Mapbox.Maui/Models/Annotations/PointAnnotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ public double? IconOpacity
{
get
{
return GetProperty<double?>("icon-opacity", default);
return GetProperty<double?>("icon-opacity", 1);
}
set
{
Expand Down Expand Up @@ -354,7 +354,7 @@ public double? TextOpacity
{
get
{
return GetProperty<double?>("text-opacity", default);
return GetProperty<double?>("text-opacity", 1);
}
set
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public Color FillColor
/// The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.
public double? FillOpacity
{
get => GetProperty<double>("fill-opacity", default);
get => GetProperty<double>("fill-opacity", 1);
set => SetProperty("fill-opacity", value);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public double? LineOpacity
{
get
{
return GetProperty<double?>("line-opacity", default);
return GetProperty<double?>("line-opacity", 1);
}
set
{
Expand Down
Loading

0 comments on commit 17d117c

Please sign in to comment.