Skip to content

Commit eb95d20

Browse files
committedNov 14, 2017
release 3.8.5
1 parent adad150 commit eb95d20

17 files changed

+218
-115
lines changed
 

‎.npmignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/build
21
/test
32
/map/tool
43
/map/raw

‎dist/echarts-en.common.js

+50-24
Original file line numberDiff line numberDiff line change
@@ -10456,7 +10456,7 @@ var instances$1 = {}; // ZRender实例map索引
1045610456
/**
1045710457
* @type {string}
1045810458
*/
10459-
var version$1 = '3.7.3';
10459+
var version$1 = '3.7.4';
1046010460

1046110461
/**
1046210462
* Initializing a zrender instance
@@ -20880,10 +20880,10 @@ var loadingDefault = function (api, opts) {
2088020880
var each = each$1;
2088120881
var parseClassType = ComponentModel.parseClassType;
2088220882

20883-
var version = '3.8.4';
20883+
var version = '3.8.5';
2088420884

2088520885
var dependencies = {
20886-
zrender: '3.7.3'
20886+
zrender: '3.7.4'
2088720887
};
2088820888

2088920889
var PRIORITY_PROCESSOR_FILTER = 1000;
@@ -48477,32 +48477,37 @@ function getSvgElement(displayable) {
4847748477

4847848478
/**
4847948479
* @alias module:zrender/svg/Painter
48480+
* @constructor
48481+
* @param {HTMLElement} root 绘图容器
48482+
* @param {module:zrender/Storage} storage
48483+
* @param {Object} opts
4848048484
*/
48481-
var SVGPainter = function (root, storage) {
48485+
var SVGPainter = function (root, storage, opts) {
4848248486

4848348487
this.root = root;
48484-
4848548488
this.storage = storage;
48489+
this._opts = opts = extend({}, opts || {});
4848648490

4848748491
var svgRoot = createElement('svg');
4848848492
svgRoot.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
4848948493
svgRoot.setAttribute('version', '1.1');
4849048494
svgRoot.setAttribute('baseProfile', 'full');
4849148495
svgRoot.style['user-select'] = 'none';
48496+
svgRoot.style.cssText = 'position:absolute;left:0;top:0;';
4849248497

4849348498
this.gradientManager = new GradientManager(svgRoot);
4849448499
this.clipPathManager = new ClippathManager(svgRoot);
4849548500

4849648501
var viewport = document.createElement('div');
48497-
viewport.style.cssText = 'overflow: hidden;';
48502+
viewport.style.cssText = 'overflow:hidden;position:relative';
4849848503

4849948504
this._svgRoot = svgRoot;
4850048505
this._viewport = viewport;
4850148506

4850248507
root.appendChild(viewport);
4850348508
viewport.appendChild(svgRoot);
4850448509

48505-
this.resize();
48510+
this.resize(opts.width, opts.height);
4850648511

4850748512
this._visibleList = [];
4850848513
};
@@ -48678,15 +48683,26 @@ SVGPainter.prototype = {
4867848683
}
4867948684
},
4868048685

48681-
resize: function () {
48682-
var width = this._getWidth();
48683-
var height = this._getHeight();
48686+
resize: function (width, height) {
48687+
var viewport = this._viewport;
48688+
// FIXME Why ?
48689+
viewport.style.display = 'none';
48690+
48691+
// Save input w/h
48692+
var opts = this._opts;
48693+
width != null && (opts.width = width);
48694+
height != null && (opts.height = height);
48695+
48696+
width = this._getSize(0);
48697+
height = this._getSize(1);
48698+
48699+
viewport.style.display = '';
4868448700

4868548701
if (this._width !== width && this._height !== height) {
4868648702
this._width = width;
4868748703
this._height = height;
4868848704

48689-
var viewportStyle = this._viewport.style;
48705+
var viewportStyle = viewport.style;
4869048706
viewportStyle.width = width + 'px';
4869148707
viewportStyle.height = height + 'px';
4869248708

@@ -48697,30 +48713,40 @@ SVGPainter.prototype = {
4869748713
}
4869848714
},
4869948715

48716+
/**
48717+
* 获取绘图区域宽度
48718+
*/
4870048719
getWidth: function () {
48701-
return this._getWidth();
48720+
return this._width;
4870248721
},
4870348722

48723+
/**
48724+
* 获取绘图区域高度
48725+
*/
4870448726
getHeight: function () {
48705-
return this._getHeight();
48727+
return this._height;
4870648728
},
4870748729

48708-
_getWidth: function () {
48709-
var root = this.root;
48710-
var stl = document.defaultView.getComputedStyle(root);
48730+
_getSize: function (whIdx) {
48731+
var opts = this._opts;
48732+
var wh = ['width', 'height'][whIdx];
48733+
var cwh = ['clientWidth', 'clientHeight'][whIdx];
48734+
var plt = ['paddingLeft', 'paddingTop'][whIdx];
48735+
var prb = ['paddingRight', 'paddingBottom'][whIdx];
4871148736

48712-
return ((root.clientWidth || parseInt10$2(stl.width))
48713-
- parseInt10$2(stl.paddingLeft)
48714-
- parseInt10$2(stl.paddingRight)) | 0;
48715-
},
48737+
if (opts[wh] != null && opts[wh] !== 'auto') {
48738+
return parseFloat(opts[wh]);
48739+
}
4871648740

48717-
_getHeight: function () {
4871848741
var root = this.root;
48742+
// IE8 does not support getComputedStyle, but it use VML.
4871948743
var stl = document.defaultView.getComputedStyle(root);
4872048744

48721-
return ((root.clientHeight || parseInt10$2(stl.height))
48722-
- parseInt10$2(stl.paddingTop)
48723-
- parseInt10$2(stl.paddingBottom)) | 0;
48745+
return (
48746+
(root[cwh] || parseInt10$2(stl[wh]) || parseInt10$2(root.style[wh]))
48747+
- (parseInt10$2(stl[plt]) || 0)
48748+
- (parseInt10$2(stl[prb]) || 0)
48749+
) | 0;
4872448750
},
4872548751

4872648752
dispose: function () {

‎dist/echarts-en.common.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/echarts-en.js

+50-24
Original file line numberDiff line numberDiff line change
@@ -10456,7 +10456,7 @@ var instances$1 = {}; // ZRender实例map索引
1045610456
/**
1045710457
* @type {string}
1045810458
*/
10459-
var version$1 = '3.7.3';
10459+
var version$1 = '3.7.4';
1046010460

1046110461
/**
1046210462
* Initializing a zrender instance
@@ -20946,10 +20946,10 @@ var loadingDefault = function (api, opts) {
2094620946
var each = each$1;
2094720947
var parseClassType = ComponentModel.parseClassType;
2094820948

20949-
var version = '3.8.4';
20949+
var version = '3.8.5';
2095020950

2095120951
var dependencies = {
20952-
zrender: '3.7.3'
20952+
zrender: '3.7.4'
2095320953
};
2095420954

2095520955
var PRIORITY_PROCESSOR_FILTER = 1000;
@@ -74435,32 +74435,37 @@ function getSvgElement(displayable) {
7443574435

7443674436
/**
7443774437
* @alias module:zrender/svg/Painter
74438+
* @constructor
74439+
* @param {HTMLElement} root 绘图容器
74440+
* @param {module:zrender/Storage} storage
74441+
* @param {Object} opts
7443874442
*/
74439-
var SVGPainter = function (root, storage) {
74443+
var SVGPainter = function (root, storage, opts) {
7444074444

7444174445
this.root = root;
74442-
7444374446
this.storage = storage;
74447+
this._opts = opts = extend({}, opts || {});
7444474448

7444574449
var svgRoot = createElement('svg');
7444674450
svgRoot.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
7444774451
svgRoot.setAttribute('version', '1.1');
7444874452
svgRoot.setAttribute('baseProfile', 'full');
7444974453
svgRoot.style['user-select'] = 'none';
74454+
svgRoot.style.cssText = 'position:absolute;left:0;top:0;';
7445074455

7445174456
this.gradientManager = new GradientManager(svgRoot);
7445274457
this.clipPathManager = new ClippathManager(svgRoot);
7445374458

7445474459
var viewport = document.createElement('div');
74455-
viewport.style.cssText = 'overflow: hidden;';
74460+
viewport.style.cssText = 'overflow:hidden;position:relative';
7445674461

7445774462
this._svgRoot = svgRoot;
7445874463
this._viewport = viewport;
7445974464

7446074465
root.appendChild(viewport);
7446174466
viewport.appendChild(svgRoot);
7446274467

74463-
this.resize();
74468+
this.resize(opts.width, opts.height);
7446474469

7446574470
this._visibleList = [];
7446674471
};
@@ -74636,15 +74641,26 @@ SVGPainter.prototype = {
7463674641
}
7463774642
},
7463874643

74639-
resize: function () {
74640-
var width = this._getWidth();
74641-
var height = this._getHeight();
74644+
resize: function (width, height) {
74645+
var viewport = this._viewport;
74646+
// FIXME Why ?
74647+
viewport.style.display = 'none';
74648+
74649+
// Save input w/h
74650+
var opts = this._opts;
74651+
width != null && (opts.width = width);
74652+
height != null && (opts.height = height);
74653+
74654+
width = this._getSize(0);
74655+
height = this._getSize(1);
74656+
74657+
viewport.style.display = '';
7464274658

7464374659
if (this._width !== width && this._height !== height) {
7464474660
this._width = width;
7464574661
this._height = height;
7464674662

74647-
var viewportStyle = this._viewport.style;
74663+
var viewportStyle = viewport.style;
7464874664
viewportStyle.width = width + 'px';
7464974665
viewportStyle.height = height + 'px';
7465074666

@@ -74655,30 +74671,40 @@ SVGPainter.prototype = {
7465574671
}
7465674672
},
7465774673

74674+
/**
74675+
* 获取绘图区域宽度
74676+
*/
7465874677
getWidth: function () {
74659-
return this._getWidth();
74678+
return this._width;
7466074679
},
7466174680

74681+
/**
74682+
* 获取绘图区域高度
74683+
*/
7466274684
getHeight: function () {
74663-
return this._getHeight();
74685+
return this._height;
7466474686
},
7466574687

74666-
_getWidth: function () {
74667-
var root = this.root;
74668-
var stl = document.defaultView.getComputedStyle(root);
74688+
_getSize: function (whIdx) {
74689+
var opts = this._opts;
74690+
var wh = ['width', 'height'][whIdx];
74691+
var cwh = ['clientWidth', 'clientHeight'][whIdx];
74692+
var plt = ['paddingLeft', 'paddingTop'][whIdx];
74693+
var prb = ['paddingRight', 'paddingBottom'][whIdx];
7466974694

74670-
return ((root.clientWidth || parseInt10$2(stl.width))
74671-
- parseInt10$2(stl.paddingLeft)
74672-
- parseInt10$2(stl.paddingRight)) | 0;
74673-
},
74695+
if (opts[wh] != null && opts[wh] !== 'auto') {
74696+
return parseFloat(opts[wh]);
74697+
}
7467474698

74675-
_getHeight: function () {
7467674699
var root = this.root;
74700+
// IE8 does not support getComputedStyle, but it use VML.
7467774701
var stl = document.defaultView.getComputedStyle(root);
7467874702

74679-
return ((root.clientHeight || parseInt10$2(stl.height))
74680-
- parseInt10$2(stl.paddingTop)
74681-
- parseInt10$2(stl.paddingBottom)) | 0;
74703+
return (
74704+
(root[cwh] || parseInt10$2(stl[wh]) || parseInt10$2(root.style[wh]))
74705+
- (parseInt10$2(stl[plt]) || 0)
74706+
- (parseInt10$2(stl[prb]) || 0)
74707+
) | 0;
7468274708
},
7468374709

7468474710
dispose: function () {

‎dist/echarts-en.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/echarts-en.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/echarts-en.simple.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -10160,7 +10160,7 @@ var painterCtors = {
1016010160
/**
1016110161
* @type {string}
1016210162
*/
10163-
var version$1 = '3.7.3';
10163+
var version$1 = '3.7.4';
1016410164

1016510165
/**
1016610166
* Initializing a zrender instance
@@ -20320,10 +20320,10 @@ var loadingDefault = function (api, opts) {
2032020320
var each = each$1;
2032120321
var parseClassType = ComponentModel.parseClassType;
2032220322

20323-
var version = '3.8.4';
20323+
var version = '3.8.5';
2032420324

2032520325
var dependencies = {
20326-
zrender: '3.7.3'
20326+
zrender: '3.7.4'
2032720327
};
2032820328

2032920329
var PRIORITY_PROCESSOR_FILTER = 1000;

‎dist/echarts-en.simple.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.