mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
Merge pull request #492 from rstudio/bugfix/0.10misc
Miscellaneous bug fixes
This commit is contained in:
@@ -42,6 +42,9 @@ plotPNG <- function(func, filename=tempfile(fileext='.png'),
|
||||
}
|
||||
|
||||
pngfun(filename=filename, width=width, height=height, res=res, ...)
|
||||
# Call plot.new() so that even if no plotting operations are performed
|
||||
# at least we have a blank background
|
||||
plot.new()
|
||||
dv <- dev.cur()
|
||||
tryCatch(shinyCallingHandlers(func()), finally = dev.off(dv))
|
||||
|
||||
|
||||
@@ -120,8 +120,11 @@ renderPlot <- function(expr, width='auto', height='auto', res=72, ...,
|
||||
plotFunc <- function() {
|
||||
# Actually perform the plotting
|
||||
result <- withVisible(func())
|
||||
if (result$visible)
|
||||
print(result$value)
|
||||
if (result$visible) {
|
||||
# Use capture.output to squelch printing to the actual console; we
|
||||
# are only interested in plot output
|
||||
capture.output(print(result$value))
|
||||
}
|
||||
|
||||
# Now capture some graphics device info before we close it
|
||||
usrCoords <- par('usr')
|
||||
|
||||
@@ -1072,10 +1072,11 @@
|
||||
this.renderError(el, err);
|
||||
};
|
||||
this.renderError = function(el, err) {
|
||||
this.clearError(el);
|
||||
if (err.message === '') {
|
||||
// not really error, but we just need to wait (e.g. action buttons)
|
||||
$(el).empty();
|
||||
return this.clearError(el);
|
||||
return;
|
||||
}
|
||||
var errClass = 'shiny-output-error';
|
||||
if (err.type !== null) {
|
||||
|
||||
Reference in New Issue
Block a user