Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'save-svg': () => {
var svg = _this.canvas.svgDraw()
const title = _this.state.global.settings.networkName
svg.setAttribute("title", title)
svg.setAttribute("version", 1.1)
svg.setAttribute("xmlns", "http://www.w3.org/2000/svg")
try {
var isFileSaverSupported = !!new Blob()
var blob = new Blob([svg.outerHTML], {type: "image/svg+xml"})
saveAs(blob, title);
} catch (e) {
alert("can't save :(")
}
},
'save-canvas': (settings) => {
'save-svg': () => {
var svg = _this.canvas.svgDraw()
const title = _this.state.global.settings.networkName
svg.setAttribute("title", title)
svg.setAttribute("version", 1.1)
svg.setAttribute("xmlns", "http://www.w3.org/2000/svg")
try {
var isFileSaverSupported = !!new Blob()
var blob = new Blob([svg.outerHTML], {type: "image/svg+xml"})
saveAs(blob, title);
} catch (e) {
alert("can't save :(")
}
},
'save-canvas': (settings) => {