You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2020/02/14 03:03:05 UTC
[incubator-echarts] 01/03: fix(svg): download svg image with toolbox
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 fa5952ab6b5928991a2c496eab5d2c290043bc30
Author: Ovilia <zw...@gmail.com>
AuthorDate: Wed Feb 12 15:52:31 2020 +0800
fix(svg): download svg image with toolbox
---
src/component/toolbox/feature/SaveAsImage.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/component/toolbox/feature/SaveAsImage.js b/src/component/toolbox/feature/SaveAsImage.js
index d81a06d..cde8a0a 100644
--- a/src/component/toolbox/feature/SaveAsImage.js
+++ b/src/component/toolbox/feature/SaveAsImage.js
@@ -50,7 +50,8 @@ var proto = SaveAsImage.prototype;
proto.onclick = function (ecModel, api) {
var model = this.model;
var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';
- var type = model.get('type', true) || 'png';
+ var isSvg = api.getZr().painter.getType() === 'svg';
+ var type = isSvg ? 'svg' : model.get('type', true) || 'png';
var url = api.getConnectedDataURL({
type: type,
backgroundColor: model.get('backgroundColor', true)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org