R Shiny中的绝对面板隐藏在传单输出的后面 [英] Absolute panel in R shiny gets hidden behind the leaflet output
本文介绍了R Shiny中的绝对面板隐藏在传单输出的后面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使单张地图全屏显示,并在地图顶部添加过滤器控件.但是,当我尝试执行此操作时,我的过滤器控件(绝对面板)在运行时会隐藏在传单输出的后面.
I am trying to make a leaflet map full screen and also add filter controls on top of the map. However, when I try to do this my filter control(absolute panel) gets hidden behind the leaflet output during runtime.
我希望地图全屏显示,它隐藏在后面地图.
I want the map to be full-screen , when I do it, it gets hidden behind the map.
如何使地图位于绝对面板的后面?感谢您的帮助.
How can I make the map go behind the absolute panel? Any help is appreciated.
谢谢
下面是用户界面代码:
fluidPage(style="padding-top: 10px;",
h1("Locations"),
absolutePanel(
top = 60, left = "auto", right = 20, bottom = "auto",
width = 330, height = "auto",draggable = TRUE,
wellPanel(
selectInput("Suburb", "Select one Suburb:",choices = c("Select one Suburb" = "All", as.character(mydata$SuburbTown))),
uiOutput("secondselection")
),
style = "opacity: 0.65"
),
leafletOutput("leafl", height = "800px")
)
推荐答案
您可以更改面板的 z-index
使其起作用.试试这个:
You can change the z-index
of your panel to make it work.
Try this:
fluidPage(style="padding-top: 10px;",
h1("Locations"),
absolutePanel(
top = 60, left = "auto", right = 20, bottom = "auto",
width = 330, height = "auto",draggable = TRUE,
wellPanel(
selectInput("Suburb", "Select one Suburb:",choices = c("Select one Suburb" = "All", as.character(mydata$SuburbTown))),
uiOutput("secondselection")
),
style = "opacity: 0.65; z-index: 10;" ## z-index modification
),
leafletOutput("leafl", height = "800px")
)
这篇关于R Shiny中的绝对面板隐藏在传单输出的后面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文