Skip to content

Commit

Permalink
Added pull request Freeboard#135
Browse files Browse the repository at this point in the history
  • Loading branch information
joed74 committed Aug 20, 2022
1 parent d952def commit 43902ef
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
12 changes: 7 additions & 5 deletions js/freeboard.plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1321,11 +1321,13 @@ freeboard.loadDatasourcePlugin({
{
if(widgetElement && imageURL)
{
var cacheBreakerURL = imageURL + (imageURL.indexOf("?") == -1 ? "?" : "&") + Date.now();

$(widgetElement).css({
"background-image" : "url(" + cacheBreakerURL + ")"
});
var cacheBreakerURL = imageURL + (imageURL.indexOf("?") == -1 ? "?" : "&") + Date.now(), img = new Image();
img.onload = function() {
$(widgetElement).css({
"background-image" : "url(" + cacheBreakerURL + ")"
});
}
img.src = cacheBreakerURL;
}
}

Expand Down
Loading

0 comments on commit 43902ef

Please sign in to comment.