Comparing version 1.6.0 to 1.7.0
{ | ||
"name": "viz.js", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "A hack to put Graphviz on the web.", | ||
@@ -5,0 +5,0 @@ "main": "viz.js", |
@@ -19,9 +19,9 @@ # Viz.js | ||
A smaller version of Viz.js can be downloaded from the [releases page](https://github.com/mdaines/viz.js/releases). `viz-lite.js` omits Expat and the NEATO layout plugin. | ||
A smaller version of Viz.js can be downloaded from the [releases page](https://github.com/mdaines/viz.js/releases) and is available in the Bower package. `viz-lite.js` omits Expat and the NEATO layout plugin. | ||
## API | ||
### Viz(src, options={ format="svg", engine="dot", scale }) | ||
### Viz(src, options={ format="svg", engine="dot", scale, totalMemory=16777216 }) | ||
- `src` is a string representing the graph to render in the DOT language. | ||
- `src` is a string representing the graph to render in the [DOT language](http://www.graphviz.org/content/dot-language). | ||
- `options` | ||
@@ -31,2 +31,3 @@ - `format` sets the output format, and may be one of `"svg"`, `"xdot"`, `"plain"`, `"ps"`, `"json"`, or `"png-image-element"`. | ||
- `scale` sets the scale factor for the `"png-image-element"` format. If this is not specified, `window.devicePixelRatio` will be used if available, and `1` if not. | ||
- `totalMemory` sets the total memory available for the Emscripten module instance. This should be a power of 2. The default of 16MB should be sufficient for most cases — only consider using a larger number if you run into the error "Cannot enlarge memory arrays". | ||
@@ -42,3 +43,3 @@ Parses `src` and renders a graph according to the `options` given. Output is a string, except when using the "png-image-element" format, when it is returned as an instance of HTMLImageElement. | ||
If Graphviz encounters an error, the error message will be thrown as an exception. | ||
If Graphviz encounters an error, Viz will throw an `Error` object with the error message. | ||
@@ -45,0 +46,0 @@ ### Viz.svgXmlToPngImageElement(svgXml[, scale[, callback]]) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104
2419853
9536