Skip to content

Commit

Permalink
Fix export template path
Browse files Browse the repository at this point in the history
  • Loading branch information
RobotLeopard86 committed Sep 30, 2024
1 parent 6a03a0b commit 344d96d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
File renamed without changes
3 changes: 2 additions & 1 deletion src/exporter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { Button, Instance, Mapping, Scheme } from "./schema";
import fileSaver from "file-saver";
import templateURL from "./diagram_template.svg";

export const exportProject = (inst: Instance) => {
inst.forEach(async(scheme: Scheme) => {
const template = await (await fetch("/diagram_template.svg")).text();
const template = await (await fetch(templateURL)).text();
const templateDoc = new DOMParser().parseFromString(template, "image/svg+xml");

templateDoc.querySelector("#title")!.innerHTML = scheme.name;
Expand Down

0 comments on commit 344d96d

Please sign in to comment.