Hi Alex!
With trim set to true in makeImage, the code generates a new canvas element distinct from the one that gets disposed of in the TiledRenderer dispose() method, and it hangs around in the background of the page
I have a quick hack that gets rid of it but you may have something more elegant:
basically after this line
https://github.com/arose/ngl/blob/0b7a4fd53b950cf3e1411360f96d18a9512b88c5/src/viewer/viewer-utils.js#L191
I've added this to my current copy of the code
if (canvas.parentNode) { // if canvas is now the trimmed canvas, not the tiledrenderer canvas
document.body.removeChild (canvas);
}
I got the same issue.
I don't know why I add the canvas to the document in the first place. I removed that behavior (5277ee86ae9d5eb288330cdc66bc6c5101ad3cfb) and I still got to download images in all 4 major browser.
@hainm @martingraham does this fix it for you?
yes. thanks.