Sfoglia il codice sorgente

preserve spaces in text blocks in svg export (#1587)

Simonboeuf1 5 anni fa
parent
commit
ece631b430
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      src/renderer/renderElement.ts

+ 1 - 0
src/renderer/renderElement.ts

@@ -485,6 +485,7 @@ export function renderElementToSvg(
           text.setAttribute("font-size", fontSize);
           text.setAttribute("fill", element.strokeColor);
           text.setAttribute("text-anchor", textAnchor);
+          text.setAttribute("style", "white-space: pre;");
           node.appendChild(text);
         }
         svgRoot.appendChild(node);