R 在渲染图像时避免重叠,使webshot处于发亮状态
我正在尝试将元素移开,以使渲染的图像不与任何内容重叠(尝试动态地这样做,以便任何大小的页面都适合,只是将所有内容移开)。。。这整件事都很新鲜。提前谢谢你R 在渲染图像时避免重叠,使webshot处于发亮状态,r,shiny,widget,overlap,R,Shiny,Widget,Overlap,我正在尝试将元素移开,以使渲染的图像不与任何内容重叠(尝试动态地这样做,以便任何大小的页面都适合,只是将所有内容移开)。。。这整件事都很新鲜。提前谢谢你 library(shiny) library(webshot) ui <- fluidPage( titlePanel( fluidRow ( align = "center", h3("Screens")) ), sidebarLayout( #Side panel lay out to include
library(shiny)
library(webshot)
ui <- fluidPage(
titlePanel(
fluidRow ( align = "center", h3("Screens"))
),
sidebarLayout(
#Side panel lay out to include variant, gene and disease info relevant to interpretation
sidebarPanel(width=3,
h5("Screens")),
mainPanel(
textInput("screen1", h5("Screenshot1"),
value = "http://example.com/", width = "100%", placeholder = NULL),
imageOutput("screen1"),
textInput("screen2", h5("Screenshot2"),
value = "http://example.com/", width = "100%", placeholder = NULL),
imageOutput("screen2")
)))
server <- function(input, output, session) {
output$screen1 <- renderImage({
webshot(input$screen1, zoom = 1,
file = "screen1.png")
list(src = "screen1.png",
contentType = 'image/png')
})
output$screen2 <- renderImage({
webshot(input$screen2 , zoom = 1,
file = "screen2.png")
list(src = "screen2.png",
contentType = 'image/png')
})
}
shinyApp(ui = ui, server = server)
库(闪亮)
图书馆(网上热)
我不确定你到底有什么问题。我确实得到了一个webshot.js返回的失败值:1
。是否安装了phantomJS?