Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_view_state gets triggered twice on v0.5.0 #88

Closed
bdbmax opened this issue Feb 23, 2023 · 1 comment
Closed

get_view_state gets triggered twice on v0.5.0 #88

bdbmax opened this issue Feb 23, 2023 · 1 comment

Comments

@bdbmax
Copy link

bdbmax commented Feb 23, 2023

On the latest release, a get_view_state in an observer gets triggered twice (one time with the old value, and again with the right one). You can see it when grabbing the zoom in a shinyapp:

shinyApp(
  ui = fillPage(
    rdeckOutput("map", height = "100%")
  ),
  
  server = function(input, output) {
    
    output$map <- renderRdeck({
      rdeck(initial_view_state = view_state(center =  c(-73.58, 45.53), zoom = 15)) |> 
        add_mvt_layer(id = "test",
                      data = tile_json("mapbox.mapbox-streets-v8", "mapbox"))
    })
    
    observe(print(get_view_state("map")$zoom))
    
  }
)

The bug does not happen in the release v0.4.0.

@anthonynorth
Copy link
Member

Fixed in dev/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants