Repository navigation
Allow leafletProxy arguments to contain JS() - #696
Conversation
|
57008ce to
75e50f3
Compare
Also, use snapshot testing for remote unit tests
75e50f3 to
385895a
Compare
|
@jcheng5 I rebased off of master to get a clean GHA check. (No code changes needed for the rebase) |
|
@jcheng5 I saw that the previous issues have been closed and everything was redirected to this one. What should be the working example to create custom cluster icons with JS() and make everything work in leafletProxy()? With the code above markers starts clustering when I zoom out, but there is no icon for the clusters. Thanks again really a lot for working on solving this! |
|
@nicocriscuolo Just to confirm--you tried it after running |
|
@jcheng5 I can confirm that after installing this leaflet version everything works perfectly. Thanks really a lot for solving this! |
|
@jcheng5...i tried this.... remotes::install_github("rstudio/leaflet") - unfortunately didn't work for me. Would be grateful for any sugggestions' |
Fixes #420
Fixes #440
htmlwidgets provides built-in support for the
JSfunction, which lets you mark widget data string values in R to be evaluated as JS code when the widget data is deserialized in the browser. This isn't supported natively in Shiny though, soleafletProxydid not automatically inherit this behavior. The changes in this PR reimplement that mechanism forleafletProxy.Minimal reproducible example
From this SO post by @NilsOle, the following app should show the same behavior regardless of using leafletProxy or renderLeaflet. After clicking either button, zoom out to see clusters.
PR task list:
tests/testthat/R/zzz_viztest.Rdevtools::document()