remove obsolete errorSvg

This commit is contained in:
Tom 2022-05-10 13:47:43 +02:00
parent 3df712b64f
commit c85f70e197
2 changed files with 1 additions and 13 deletions

View File

@ -7,7 +7,6 @@ import openService from "./open.js";
import froca from "./froca.js"; import froca from "./froca.js";
import utils from "./utils.js"; import utils from "./utils.js";
import linkService from "./link.js"; import linkService from "./link.js";
import errorSvg from "../widgets/type_widgets/canvas-utils/errorSvg.js";
let idCounter = 1; let idCounter = 1;
@ -150,7 +149,7 @@ async function getRenderedContent(note, options = {}) {
const content = noteComplement.content || ""; const content = noteComplement.content || "";
try { try {
const placeHolderSVG = errorSvg; const placeHolderSVG = "<svg />";
const data = JSON.parse(content) const data = JSON.parse(content)
const svg = data.svg || placeHolderSVG; const svg = data.svg || placeHolderSVG;
/** /**

View File

@ -1,11 +0,0 @@
/**
* used a placeholder, when svg parsing fails
*/
const erorrSvg = `<svg viewBox="0 0 240 80" style="background-color: white" xmlns="http://www.w3.org/2000/svg">
<style>.red { font: 12px serif; fill: red; }</style>
<text x="20" y="35" class="red">
Error: note svg is undefined or empty
</text>
</svg>`;
export default erorrSvg;