-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpatch.diff
63 lines (59 loc) · 2.37 KB
/
patch.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
diff --git a/src/echarts.js b/src/echarts.js
index 5c36a4c..71c72b6 100644
--- a/src/echarts.js
+++ b/src/echarts.js
@@ -1,8 +1,5 @@
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (factory((global.echarts = {})));
-}(this, (function (exports) { 'use strict';
+const exports = {};
+if (!self.window) self.window = self;
/*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -29515,7 +29512,7 @@ function updateHoverLayerStatus(ecIns, ecModel) {
elCount++;
});
- if (elCount > ecModel.get('hoverLayerThreshold') && !env$1.node) {
+ if (elCount > ecModel.get('hoverLayerThreshold') && !env$1.node && !env$1.worker) {
ecModel.eachSeries(function (seriesModel) {
if (seriesModel.preventUsingHoverLayer) {
return;
@@ -79810,6 +79807,12 @@ proto$2.onclick = function (ecModel, api) {
var title = model.get('name') || ecModel.get('title.0.text') || 'echarts';
var isSvg = api.getZr().painter.getType() === 'svg';
var type = isSvg ? 'svg' : model.get('type', true) || 'png';
+ if (typeof api.saveAsImage === 'function') {
+ return api.saveAsImage({
+ title: title,
+ type: type,
+ });
+ }
var url = api.getConnectedDataURL({
type: type,
backgroundColor: model.get('backgroundColor', true)
@@ -83880,8 +83883,15 @@ extendComponentView({
var renderMode = tooltipModel.get('renderMode');
this._renderMode = getTooltipRenderMode(renderMode);
+ var renderer = tooltipModel.get('renderer');
var tooltipContent;
- if (this._renderMode === 'html') {
+ if (renderer) {
+ tooltipContent = new renderer({
+ appendToBody: tooltipModel.get('appendToBody', true)
+ });
+ this._newLine = renderer.newLine;
+ }
+ else if (this._renderMode === 'html') {
tooltipContent = new TooltipContent(api.getDom(), api, {
appendToBody: tooltipModel.get('appendToBody', true)
});
@@ -98855,6 +98865,6 @@ exports.List = List;
exports.Model = Model;
exports.Axis = Axis;
exports.env = env$1;
+exports.normalizeEvent = normalizeEvent;
-})));
-//# sourceMappingURL=echarts.js.map
+export default exports;