Skip to content

Commit 78ce11d

Browse files
committed
Don't initialize marker in a reactive context
shinywidgets now closes the widget when the reactive context gets invalidated, which I feel like shouldn't happen in this case, but the Shiny.setInputValue() calls seem to invlalidate 🤷
1 parent c983d89 commit 78ce11d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

examples/airmass/location.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def location_server(
3737
input: Inputs, output: Outputs, session: Session, *, wrap_long: bool = True
3838
):
3939
map = L.Map(center=(0, 0), zoom=1, scoll_wheel_zoom=True)
40-
with reactive.isolate():
41-
marker = L.Marker(location=(input.lat() or 0, input.long() or 0))
40+
marker = L.Marker(location=(0, 0))
4241

4342
with reactive.isolate(): # Use this to ensure we only execute one time
4443
if input.lat() is None and input.long() is None:

0 commit comments

Comments
 (0)