const onDownloadPng = () => {
          const svg = document.querySelector("#preview > svg");
          const svgData = new XMLSerializer().serializeToString(svg);
          const canvas = document.createElement("canvas");
          canvas.width = svg.width.baseVal.value;
          canvas.height = svg.height.baseVal.value;

          const ctx = canvas.getContext("2d");
          const image = new Image;
          image.onload = () => {
            ctx.drawImage(image, 0, 0);
            const a = document.