Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion svg_todataurl.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
Additional: image/jpeg.

options is a map of options: {
log: true

callback: function(dataURL)
Callback function which is called when the data URL is ready.
This is only necessary when using native PNG renderer.
Expand Down Expand Up @@ -41,9 +43,10 @@

SVGElement.prototype.toDataURL = function(type, options) {
var _svg = this;
var log = (options.log) ? options.log : true;

function debug(s) {
console.log("SVG.toDataURL:", s);
if (log) console.log("SVG.toDataURL:", s);
}

function exportSVG() {
Expand Down