diff --git a/modules/ui/heightmap-editor.js b/modules/ui/heightmap-editor.js index 43200d26..effb81c7 100644 --- a/modules/ui/heightmap-editor.js +++ b/modules/ui/heightmap-editor.js @@ -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";