Compare commits

...
1 Commits
Author SHA1 Message Date
Sidharth Vinod dd17fd7e3f fix #796: Export SVG fix 2022-06-29 00:25:25 +05:30
2 changed files with 16 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}"
}
]
}
+1
View File
@@ -57,6 +57,7 @@
const svgEl: HTMLElement = document const svgEl: HTMLElement = document
.querySelector('#container svg') .querySelector('#container svg')
.cloneNode(true) as HTMLElement; .cloneNode(true) as HTMLElement;
svgEl.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
const fontAwesomeCdnUrl = Array.from(document.head.getElementsByTagName('link')) const fontAwesomeCdnUrl = Array.from(document.head.getElementsByTagName('link'))
.map((l) => l.href) .map((l) => l.href)
.find((h) => h && h.includes('font-awesome')); .find((h) => h && h.includes('font-awesome'));