r-spatial / leafsync

Small Multiples for Leaflet Webmaps
Other
36 stars 2 forks source link

Vertical scrollbar #6

Open mtennekes opened 2 years ago

mtennekes commented 2 years ago

Hi Tim,

Thanks for implementing the between argument! It works but I often got a vertical scrollbar:

Screenshot from 2022-03-15 20-21-39

It is browser dependent. For this specific tmap example the results are: in RStudio viewer pane, it is always there (even when between is set to 0px), in the stand-alone RStudio browser (when pressed on "zoom"), it only appears when between is set to 5 or 10px. In Firefox I got the scrollbar when between > 5px.

mtennekes commented 2 years ago

Do you also have arguments to set the outer margins?

mtennekes commented 2 years ago

(Also good the mention in the docs that "between" also can be set with other units like "em")

tim-salabim commented 2 years ago

Hi Martijn, I'll look into this soon. Currently you can't set anything but between, but we can surely make the adjustment to also be able to control the outer margins. And I guess it would also make sense to be able to adjust the outer div so that the vertical scrollbar can be avoided...

tim-salabim commented 2 years ago

@mtennekes I am currently planning on revising the package completely so that all styling can be set via css. That would make things a lot easier for everyone using the package (I hope). I also want to address the long standing issue of not being able to save a leafsync object with saveWidget. This, however, means that it will take a while to implement it all. It is high on my priority list but the next few weekends are filled with other stuff. I hope that doesn't interfere with your tmap release plans...

mtennekes commented 2 years ago

Great idea! And no, it doesn't interfere with tmap development schedule at all; I just use what is there, and besides, it still takes a while before it is stable.

mtennekes commented 1 year ago

What is the status of the 'between margin'? I noticed that the syncing doesn't work (anymore?) with between margin enabled:

library(leaflet)
library(leafsync)

m1 = leaflet() %>%
  addTiles() %>%
  addPolygons(data = gadmCHE)
latticeview(m1, m1, m1, between.margin = list(x = "1em", y = "1em"), sync = "all")

(And the margins also remain unchanged).

tim-salabim commented 1 year ago

Oh, this fell off the table completely... Sorry. I haven't used it for more than a year. Not sure when I can look into this, but I'll put it on my to-do list

mtennekes commented 1 year ago

No worries, same here:-) It has low priority for me