@@ -792,9 +792,9 @@ verbatimTextOutput <- function(outputId, placeholder = FALSE) {
792
792
# ' @name plotOutput
793
793
# ' @rdname plotOutput
794
794
# ' @export
795
- imageOutput <- function (outputId , width = " 100%" , height = " 400px" ,
795
+ imageOutput <- function (outputId , width = " 100%" , height = " 400px" ,
796
796
click = NULL , dblclick = NULL , hover = NULL , brush = NULL ,
797
- inline = FALSE ) {
797
+ inline = FALSE , fill = TRUE ) {
798
798
799
799
style <- if (! inline ) {
800
800
# Using `css()` here instead of paste/sprintf so that NULL values will
@@ -850,7 +850,11 @@ imageOutput <- function(outputId, width = "100%", height="400px",
850
850
}
851
851
852
852
container <- if (inline ) span else div
853
- do.call(container , args )
853
+ res <- do.call(container , args )
854
+ if (fill ) {
855
+ res <- asFillItem(res )
856
+ }
857
+ res
854
858
}
855
859
856
860
# ' Create an plot or image output element
@@ -1088,11 +1092,11 @@ imageOutput <- function(outputId, width = "100%", height="400px",
1088
1092
# ' @export
1089
1093
plotOutput <- function (outputId , width = " 100%" , height = " 400px" ,
1090
1094
click = NULL , dblclick = NULL , hover = NULL , brush = NULL ,
1091
- inline = FALSE ) {
1095
+ inline = FALSE , fill = TRUE ) {
1092
1096
1093
1097
# Result is the same as imageOutput, except for HTML class
1094
1098
res <- imageOutput(outputId , width , height , click , dblclick ,
1095
- hover , brush , inline )
1099
+ hover , brush , inline , fill )
1096
1100
1097
1101
res $ attribs $ class <- " shiny-plot-output"
1098
1102
res
@@ -1155,12 +1159,16 @@ dataTableOutput <- function(outputId) {
1155
1159
# ' )
1156
1160
# ' @export
1157
1161
htmlOutput <- function (outputId , inline = FALSE ,
1158
- container = if (inline ) span else div , ... )
1162
+ container = if (inline ) span else div , fill = FALSE , ... )
1159
1163
{
1160
1164
if (any_unnamed(list (... ))) {
1161
1165
warning(" Unnamed elements in ... will be replaced with dynamic UI." )
1162
1166
}
1163
- container(id = outputId , class = " shiny-html-output" , ... )
1167
+ res <- container(id = outputId , class = " shiny-html-output" , ... )
1168
+ if (fill ) {
1169
+ res <- asFillContainer(res , asItem = TRUE )
1170
+ }
1171
+ res
1164
1172
}
1165
1173
1166
1174
# ' @rdname htmlOutput
0 commit comments