8000 GitHub - synesenom/dl: Download helper for SVG graphics
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

synesenom/dl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Description

Library for exporting SVG content from the DOM.

Requirements

d3

Limitations

Only works with styles defined inline in the SVG for every single element.

API reference

png

dl.png(svg, filename, options)

Exports a specific SVG content as a PNG image.

argument description
svg Selector for the SVG element to export, either the SVG element itself, its ID or class.
filename Name of the exported PNG.
options Additional options for the PNG. Possible keys: width, height.

eps

dl.eps(svg, filename)

Exports a specific SVG content as an EPS image. Supported shapes: line, circle. Transparency is not supported, only alpha-blending with background.

argument description
svg Selector for the SVG element to export, either the SVG element itself, its ID or class.
filename Name of the exported EPS.

json

dl.json(svg, filename)

Exports the specified SVG content to a graph JSON file. The SVG content is expected to be a network drawn with d3, that is, only circle and line elements are exported.

argument description
svg Selector for the SVG element to export, either the SVG itself, its ID or class.
filename Name of the exported JSON.

About

Download helper for SVG graphics

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0