diff --git a/dev/misc/png.html b/dev/misc/png.html
index d5a90fd99..dd1d629ec 100644
--- a/dev/misc/png.html
+++ b/dev/misc/png.html
@@ -94,7 +94,7 @@
console.log(`${ browser.guid } is good to go`)
document.querySelector('#igv-save-as-png-button').addEventListener('click', () => {
- browser.savePNGtoFile('saveIGVJSToPNG.png')
+ browser.savePNGtoFile(`igvjs-screendump-${ browser.guid }.png`)
})
})
diff --git a/js/browser.js b/js/browser.js
index f9c61419e..b51204d09 100755
--- a/js/browser.js
+++ b/js/browser.js
@@ -419,13 +419,11 @@ class Browser {
}
savePNGtoFile(filename) {
-
- html2canvas(document.querySelector('.igv-column-container'), { allowTaint: true }).then(canvas => {
+ html2canvas(this.columnContainer, { allowTaint: true }).then(canvas => {
const path = filename || 'igvjs.png'
const data = canvas.toDataURL('image/png')
FileUtils.download(path, data)
})
-
}
/**