Merge pull request #1 from juacom99/juacom99-patch-1

Fix HeightMap preview download image size
This commit is contained in:
juacom99 2022-02-21 12:31:15 -03:00 committed by GitHub
commit 4c384f6a4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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";