1.0.0 • Published 9 years ago
phylocanvas-plugin-export-svg v1.0.0
Phylocanvas Export SVG Plugin
Export Phylocanvas trees as SVG.
Usage
npm install phylocanvas phylocanvas-plugin-export-svgimport Phylocanvas from 'phylocanvas';
import exportSvgPlugin from 'phylocanvas-plugin-export-svg';
Phylocanvas.plugin(exportSvgPlugin);
const tree = Phylocanvas.createTree('id');
tree.exportSVG.getSVG();
// or
tree.exportSVG.getSerialisedSVG();Methods
getSVG(): returns the detached SVG DOM element.getSerialisedSVG(fixNamedEntities = false): returns SVG serialised as a string. PassfixNamedEntitiesastrueto convert named entities to numbered entities.
1.0.0
9 years ago