This is an automated email from the ASF dual-hosted git repository. ovilia pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 8028f41f84e8834c715cdc9cf03d24890669d6ad Author: Ovilia <zwl.s...@gmail.com> AuthorDate: Fri Feb 14 10:41:15 2020 +0800 fix(svg): rename function name --- src/echarts.js | 8 ++++---- test/toolbox-saveImage-background-svg.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/echarts.js b/src/echarts.js index c53d8e2..b35ae3b 100644 --- a/src/echarts.js +++ b/src/echarts.js @@ -473,7 +473,7 @@ echartsProto.getRenderedCanvas = function (opts) { * Get svg data url * @return {string} */ -echartsProto.getSvgDataUrl = function () { +echartsProto.getSvgDataURL = function () { if (!env.svgSupported) { return; } @@ -485,7 +485,7 @@ echartsProto.getSvgDataUrl = function () { el.stopAnimation(true); }); - return zr.painter.pathToDataUrl(); + return zr.painter.toDataURL(); }; /** @@ -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') ); @@ -611,7 +611,7 @@ echartsProto.getConnectedDataURL = function (opts) { } zr.refreshImmediately(); - return zr.painter.pathToDataUrl(); + return zr.painter.toDataURL(); } else { // Background between the charts diff --git a/test/toolbox-saveImage-background-svg.html b/test/toolbox-saveImage-background-svg.html index beeddf2..54c4a61 100644 --- a/test/toolbox-saveImage-background-svg.html +++ b/test/toolbox-saveImage-background-svg.html @@ -47,7 +47,7 @@ under the License. <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> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org For additional commands, e-mail: commits-h...@echarts.apache.org