Reset globalAlpha back to its initial after mutating it for drawing layers
This commit is contained in:
@@ -98,6 +98,7 @@ 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');
|
||||
|
||||
@@ -83,6 +83,7 @@ exportButton.addEventListener(
|
||||
}
|
||||
}
|
||||
);
|
||||
mapContext.globalAlpha = 1;
|
||||
const pdf = new jspdf.jsPDF('landscape', undefined, format);
|
||||
pdf.addImage(
|
||||
mapCanvas.toDataURL('image/jpeg'),
|
||||
|
||||
Reference in New Issue
Block a user