How to use the svg-crowbar function in svg-crowbar

To help you get started, we’ve selected a few svg-crowbar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GNS3 / gns3-web-ui / src / app / components / project-map / project-map-menu / project-map-menu.component.ts View on Github external
splittedSvg[i] = splittedElement[1].substring(2);
                i += 2;
            }
            let svgString = splittedSvg.join();

            let placeholder = document.createElement('div');
            placeholder.innerHTML = svgString;
            let element = placeholder.firstChild;

            svg.saveSvgAsPng(element, `${screenshotProperties.name}.png`);
        } else {
            var svg_el = select("svg")
            .attr("version", 1.1)
            .attr("xmlns", "http://www.w3.org/2000/svg")
            .node();
            downloadSvg(select("svg").node(), `${screenshotProperties.name}`);
        }
    }

svg-crowbar

A library based on a Chrome-specific bookmarklet that extracts SVG nodes and accompanying styles from an HTML document and downloads them as an SVG file

MIT
Latest version published 3 years ago

Package Health Score

55 / 100
Full package analysis

Popular svg-crowbar functions