leafsync icon indicating copy to clipboard operation
leafsync copied to clipboard

Vertical scrollbar

Open mtennekes opened this issue 2 years ago • 8 comments

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 avatar Mar 15 '22 19:03 mtennekes

Do you also have arguments to set the outer margins?

mtennekes avatar Mar 15 '22 19:03 mtennekes

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

mtennekes avatar Mar 15 '22 19:03 mtennekes

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 avatar Mar 16 '22 18:03 tim-salabim

@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...

tim-salabim avatar Mar 22 '22 18:03 tim-salabim

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 avatar Mar 23 '22 09:03 mtennekes

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).

mtennekes avatar Feb 28 '23 14:02 mtennekes

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

tim-salabim avatar Feb 28 '23 15:02 tim-salabim

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

mtennekes avatar Feb 28 '23 18:02 mtennekes