This commit is contained in:
Pieter Vander Vennet 2021-05-07 13:17:42 +02:00
parent 4e6a26abae
commit 7b0293d7e2
4 changed files with 1315 additions and 1639 deletions

View file

@ -285,6 +285,15 @@ export class Utils {
}
return result;
}
public static downloadTxtFile (contents: string, fileName: string = "download.txt") {
const element = document.createElement("a");
const file = new Blob([contents], {type: 'text/plain'});
element.href = URL.createObjectURL(file);
element.download = fileName;
document.body.appendChild(element); // Required for this to work in FireFox
element.click();
}
}
export interface TileRange{