Commit 7ad195e9 authored by Joshua Gould's avatar Joshua Gould

check for png too large

parent ee4bfa56
......@@ -2925,8 +2925,12 @@ morpheus.HeatMap.prototype = {
var context = canvas.getContext('2d');
this.snapshot(context);
canvas.toBlob(function (blob) {
if (blob.size === 0) {
throw 'Image is too large.';
if (blob == null || blob.size === 0) {
morpheus.FormBuilder.showInModal({
title: 'Save Image',
html: 'Image is too large to save.'
});
return;
}
saveAs(blob, file, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment