Add shiny-scalable class

This commit is contained in:
Winston Chang
2018-07-20 14:44:21 -05:00
parent 6ebbad5273
commit 9d0bcd5637
2 changed files with 2 additions and 1 deletions

View File

@@ -508,6 +508,7 @@ renderCachedPlot <- function(expr,
img <- result$plotObj$img
# Replace exact pixel dimensions; instead, the max-height and
# max-width will be set to 100% from CSS.
img$class <- "shiny-scalable"
img$width <- NULL
img$height <- NULL

View File

@@ -12,7 +12,7 @@ pre.shiny-text-output.noplaceholder:empty {
height: 0;
}
.shiny-image-output img, .shiny-plot-output img {
.shiny-image-output img.shiny-scalable, .shiny-plot-output img.shiny-scalable {
max-width: 100%;
max-height: 100%;
}