mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.5.24 - don't append link on save
This commit is contained in:
parent
c874c74a72
commit
e4e40fab49
4 changed files with 0 additions and 8 deletions
|
|
@ -8,7 +8,6 @@ async function saveSVG() {
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.download = getFileName() + ".svg";
|
link.download = getFileName() + ".svg";
|
||||||
link.href = url;
|
link.href = url;
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
link.click();
|
||||||
|
|
||||||
tip(`${link.download} is saved. Open "Downloads" screen (crtl + J) to check. You can set image scale in options`, true, "success", 5000);
|
tip(`${link.download} is saved. Open "Downloads" screen (crtl + J) to check. You can set image scale in options`, true, "success", 5000);
|
||||||
|
|
@ -33,7 +32,6 @@ async function savePNG() {
|
||||||
link.download = getFileName() + ".png";
|
link.download = getFileName() + ".png";
|
||||||
canvas.toBlob(function(blob) {
|
canvas.toBlob(function(blob) {
|
||||||
link.href = window.URL.createObjectURL(blob);
|
link.href = window.URL.createObjectURL(blob);
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
link.click();
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
canvas.remove();
|
canvas.remove();
|
||||||
|
|
@ -64,7 +62,6 @@ async function saveJPEG() {
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.download = getFileName() + ".jpeg";
|
link.download = getFileName() + ".jpeg";
|
||||||
link.href = URL;
|
link.href = URL;
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
link.click();
|
||||||
tip(`${link.download} is saved. Open "Downloads" screen (CTRL + J) to check`, true, "success", 7000);
|
tip(`${link.download} is saved. Open "Downloads" screen (CTRL + J) to check`, true, "success", 7000);
|
||||||
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
||||||
|
|
@ -378,7 +375,6 @@ async function saveMap() {
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.download = getFileName() + ".map";
|
link.download = getFileName() + ".map";
|
||||||
link.href = URL;
|
link.href = URL;
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
link.click();
|
||||||
tip(`${link.download} is saved. Open "Downloads" screen (CTRL + J) to check`, true, "success", 7000);
|
tip(`${link.download} is saved. Open "Downloads" screen (CTRL + J) to check`, true, "success", 7000);
|
||||||
window.URL.revokeObjectURL(URL);
|
window.URL.revokeObjectURL(URL);
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,6 @@ const saveScreenshot = async function() {
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.download = getFileName() + ".jpeg";
|
link.download = getFileName() + ".jpeg";
|
||||||
link.href = URL;
|
link.href = URL;
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
link.click();
|
||||||
tip(`Screenshot is saved. Open "Downloads" screen (CTRL + J) to check`, true, "success", 7000);
|
tip(`Screenshot is saved. Open "Downloads" screen (CTRL + J) to check`, true, "success", 7000);
|
||||||
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
||||||
|
|
|
||||||
|
|
@ -245,7 +245,6 @@ function editEmblem(type, id, el) {
|
||||||
|
|
||||||
function downloadSVG(url, link) {
|
function downloadSVG(url, link) {
|
||||||
link.href = url;
|
link.href = url;
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
link.click();
|
||||||
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
||||||
}
|
}
|
||||||
|
|
@ -266,7 +265,6 @@ function editEmblem(type, id, el) {
|
||||||
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
ctx.drawImage(img, 0, 0, canvas.width, canvas.height);
|
||||||
const URL = await canvas.toDataURL("image/" + format, .92);
|
const URL = await canvas.toDataURL("image/" + format, .92);
|
||||||
link.href = URL;
|
link.href = URL;
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
link.click();
|
||||||
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
window.setTimeout(() => window.URL.revokeObjectURL(URL), 5000);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1311,7 +1311,6 @@ function editHeightmap() {
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.download = getFileName("Heightmap") + ".png";
|
link.download = getFileName("Heightmap") + ".png";
|
||||||
link.href = imgBig;
|
link.href = imgBig;
|
||||||
document.body.appendChild(link);
|
|
||||||
link.click();
|
link.click();
|
||||||
canvas.remove();
|
canvas.remove();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue