diff --git a/examples/03_distributions/www/index.html b/examples/03_distributions/www/index.html index d14be5ab3..d5cbeabb8 100644 --- a/examples/03_distributions/www/index.html +++ b/examples/03_distributions/www/index.html @@ -22,7 +22,7 @@

-
+
diff --git a/www/shared/shiny.js b/www/shared/shiny.js index f16ef3aa8..75ad58a85 100644 --- a/www/shared/shiny.js +++ b/www/shared/shiny.js @@ -103,12 +103,17 @@ }; (function() { this.onValueChange = function(data) { - $(this.el).empty(); - if (!data) - return; - var img = document.createElement('img'); - img.src = data; - this.el.appendChild(img); + if (this.el.tagName == 'IMG') { + this.el.src = data ? data : ''; + } + else { + $(this.el).empty(); + if (!data) + return; + var img = document.createElement('img'); + img.src = data; + this.el.appendChild(img); + } }; }).call(LivePlotBinding.prototype);