Подтвердить что ты не робот

Нижний выравнивает кнопку в R блестящей

Я не могу найти способ нижнего выравнивания downloadButton с selectizeInput, т.е.

enter image description here

library(shiny)

runApp(list(
  ui = shinyUI(fluidPage(
    fluidRow(align="bottom",
      column(12, align="bottom",
             h4("Download Options:"),
             fluidRow(align="bottom", 
                      column(6, selectizeInput("plot_dl", "File Type", width="100%",  
                                               choices = list("PDF"="pdf","PNG"="png"))),
                      column(3, downloadButton('plot1_dl', 'Left Plot')),
                      column(3, downloadButton('plot2_dl', 'Right Plot'))
             )
      )
    ),
    tags$style(type='text/css', "#plot1_dl { width:100%; vertical-align:bottom}"),
    tags$style(type='text/css', "#plot2_dl { width:100%;}")
  )),
  server = function(input, output) {
  }
))

Размещение align="bottom" везде и всюду не выдает сообщение об ошибке, но также не имеет желаемого эффекта. Пробовал играть с тегами стиля кнопок, но хорошо из глубины.

4b9b3361

Ответ 1

В теге стиля найдено ad-hoc fix с margin-top: 25px...

enter image description here

library(shiny)

runApp(list(
  ui = shinyUI(fluidPage(
     h4("Download Options:"),
     fluidRow(
       column(6, selectizeInput("plot_dl", "File Type", width="100%",
                                choices = list("PDF"="pdf","PNG"="png"))),
       column(3, downloadButton('plot1_dl', 'Left Plot')),
       column(3, downloadButton('plot2_dl', 'Right Plot'))
     ),
     tags$style(type='text/css', "#plot1_dl { width:100%; margin-top: 25px;}"),
     tags$style(type='text/css', "#plot2_dl { width:100%; margin-top: 25px;}")
  )),
  server = function(input, output) {
  }
))

Ответ 2

Другой способ сделать это - передать аргумент style в функции столбца.


runApp(list(
        ui = shinyUI(fluidPage(
                h4("Download Options:"),
                fluidRow(
                        column(6, selectizeInput("plot_dl", "File Type", width="100%",
                                                 choices = list("PDF"="pdf","PNG"="png"))),
                        column(3, style = "margin-top: 25px;", downloadButton('plot1_dl', 'Left Plot')),
                        column(3, style = "margin-top: 25px;", downloadButton('plot2_dl', 'Right Plot'))
                )
        )),
        server = function(input, output) {
        }
))