dreamRs / shinybusy

Minimal busy indicator for Shiny apps
https://dreamrs.github.io/shinybusy/
Other
138 stars 16 forks source link

margins - can they be changed proportional to the display area? #8

Closed DavidPatShuiFong closed 4 years ago

DavidPatShuiFong commented 4 years ago

Really like the appearance, and the easy use, of the spinners!

Is there a way to set the locations of the spinner margins in a way which is proportional to the size of the displayed are? (In my case, I am using shinydashboardplus, and I am placing shinybusy::add_busy_spinner in the body).

Basically, I would like to place the spinner in the middle of the displayed area!

Thanks, David

DavidPatShuiFong commented 4 years ago

I'll answer my own question.

Margins can be set to CSS units such as 'vh' and 'vw'. So the following works

shinybusy::add_busy_spinner(spin = "flower", color = "#f06023", position = "top-left", margins = c("35vh", "55vw"))