Remove msSaveBlob fallback for IE
This commit is contained in:
@@ -139,14 +139,9 @@ function download(fullpath, filename) {
|
||||
return response.blob();
|
||||
})
|
||||
.then(function (blob) {
|
||||
if (navigator.msSaveBlob) {
|
||||
// link download attribute does not work on MS browsers
|
||||
navigator.msSaveBlob(blob, filename);
|
||||
} else {
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = filename;
|
||||
link.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -107,14 +107,9 @@ function download(fullpath, filename) {
|
||||
return response.blob();
|
||||
})
|
||||
.then(function (blob) {
|
||||
if (navigator.msSaveBlob) {
|
||||
// link download attribute does not work on MS browsers
|
||||
navigator.msSaveBlob(blob, filename);
|
||||
} else {
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = filename;
|
||||
link.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -101,14 +101,9 @@ function download(fullpath, filename) {
|
||||
return response.blob();
|
||||
})
|
||||
.then(function (blob) {
|
||||
if (navigator.msSaveBlob) {
|
||||
// link download attribute does not work on MS browsers
|
||||
navigator.msSaveBlob(blob, filename);
|
||||
} else {
|
||||
link.href = URL.createObjectURL(blob);
|
||||
link.download = filename;
|
||||
link.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -99,14 +99,9 @@ document.getElementById('export-png').addEventListener('click', function () {
|
||||
}
|
||||
);
|
||||
mapContext.globalAlpha = 1;
|
||||
if (navigator.msSaveBlob) {
|
||||
// link download attribute does not work on MS browsers
|
||||
navigator.msSaveBlob(mapCanvas.msToBlob(), 'map.png');
|
||||
} else {
|
||||
const link = document.getElementById('image-download');
|
||||
link.href = mapCanvas.toDataURL();
|
||||
link.click();
|
||||
}
|
||||
});
|
||||
map.renderSync();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user