Skip to content

Commit

Permalink
fix(svg): rename function name
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Feb 14, 2020
1 parent 41da1fa commit 8028f41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/echarts.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ echartsProto.getRenderedCanvas = function (opts) {
* Get svg data url
* @return {string}
*/
echartsProto.getSvgDataUrl = function () {
echartsProto.getSvgDataURL = function () {
if (!env.svgSupported) {
return;
}
Expand All @@ -485,7 +485,7 @@ echartsProto.getSvgDataUrl = function () {
el.stopAnimation(true);
});

return zr.painter.pathToDataUrl();
return zr.painter.toDataURL();
};

/**
Expand Down Expand Up @@ -521,7 +521,7 @@ echartsProto.getDataURL = function (opts) {
});

var url = this._zr.painter.getType() === 'svg'
? this.getSvgDataUrl()
? this.getSvgDataURL()
: this.getRenderedCanvas(opts).toDataURL(
'image/' + (opts && opts.type || 'png')
);
Expand Down Expand Up @@ -611,7 +611,7 @@ echartsProto.getConnectedDataURL = function (opts) {
}

zr.refreshImmediately();
return zr.painter.pathToDataUrl();
return zr.painter.toDataURL();
}
else {
// Background between the charts
Expand Down
2 changes: 1 addition & 1 deletion test/toolbox-saveImage-background-svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<div id="chart0" class="chart"></div>

<p>The background of the exported png using toolbox should be yellow.</p>
<p>The background of the exported svg using toolbox should be yellow.</p>

<div id="chart1" class="chart"></div>
<div id="chart2" class="chart"></div>
Expand Down

0 comments on commit 8028f41

Please sign in to comment.