Skip to content

Commit 85648e4

Browse files
committed
Invalidate size feature
1 parent 296f55c commit 85648e4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/GenOne.Blazor.Map/src/Component/Map.razor

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@
121121
private Marker? _marker;
122122
private Marker? _userMarker;
123123

124+
public Task InvalidateSize()
125+
{
126+
MapInitializationException.ThrowIf(_map is null);
127+
return _map.InvalidateSize();
128+
}
129+
124130
protected override void OnInitialized()
125131
{
126132
//var position = ViewPosition ?? MarkerPosition ?? GpsLocation.Empty;
@@ -165,7 +171,7 @@
165171

166172
await _map.OnClick(OnClickInner);
167173
await _map.MapEvented.OnDragStart(_ => DisableFollowConsumerLocation());
168-
174+
169175
await OnMapInitialized.InvokeAsync(this);
170176
}
171177

0 commit comments

Comments
 (0)