我正在尝试使用processingJS在画布上绘制带有边界的“世界”。我希望主屏幕为黑色,边框周围有灰色。首先我试过了:
library(shiny)
library(shinydashboard)
# these must be unique and exist for every item
itemIds <- c(team = "#team", team2 = "#team2", user = "#user")
ui <- dashboardPage(
dashboardHeader(
dropdownMenu(type = "messages", badgeStatus = "success",
messageItem("Support Team", "This is the content of a message.",
time = "5 mins", href = itemIds[["team"]]
),
messageItem("Support Team", "This is the content of another message.",
time = "2 hours", href = itemIds[["team2"]]
),
messageItem("New User", "Can I get some help?",
time = "Today", href = itemIds[["user"]]
)
)
),
dashboardSidebar(),
dashboardBody(
sliderInput("sld", "This is here so you know that other inputs are not affected by this workaround", 0, 100, 50),
uiOutput("ui")
)
)
server <- function(input, output, session) {
output$ui <- renderUI({
hash <- getUrlHash()
if (hash %in% itemIds) {
paste("This is shown when", hash, "is clicked")
}
})
}
shinyApp(ui, server)
我的processingJS代码中的其他所有内容都运行正常,除此之外。我也尝试过:
View::make('location.of.template', ..)
这也不起作用。甚至可以在画布的直接显示区域之外绘制一个矩形吗? 非常感谢你!