mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Fix Height Map preview download image size (#746)
This commit is contained in:
parent
97a864dde8
commit
e1b0688615
1 changed files with 3 additions and 3 deletions
|
|
@ -1316,10 +1316,10 @@ function editHeightmap() {
|
|||
img.onload = function () {
|
||||
const canvas = document.createElement("canvas");
|
||||
const ctx = canvas.getContext("2d");
|
||||
canvas.width = svgWidth;
|
||||
canvas.height = svgHeight;
|
||||
canvas.width = graphWidth;
|
||||
canvas.height = graphHeight;
|
||||
document.body.insertBefore(canvas, optionsContainer);
|
||||
ctx.drawImage(img, 0, 0, svgWidth, svgHeight);
|
||||
ctx.drawImage(img, 0, 0, graphWidth, graphHeight);
|
||||
const imgBig = canvas.toDataURL("image/png");
|
||||
const link = document.createElement("a");
|
||||
link.download = getFileName("Heightmap") + ".png";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue