Skip to content

Commit

Permalink
Merge pull request #14778 from apache/release-dev
Browse files Browse the repository at this point in the history
Release 5.1.1
  • Loading branch information
pissang authored Apr 23, 2021
2 parents dad3b3b + 737e23c commit 786af8b
Show file tree
Hide file tree
Showing 15 changed files with 126 additions and 135 deletions.
52 changes: 23 additions & 29 deletions dist/echarts.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -28986,7 +28986,7 @@
var isObject$2 = isObject;
var indexOf$1 = indexOf;
var hasWindow = typeof window !== 'undefined';
var version$1 = '5.1.0';
var version$1 = '5.1.1';
var dependencies = {
zrender: '5.1.0'
};
Expand Down Expand Up @@ -44527,11 +44527,8 @@
var _this = _super.call(this) || this;

_this.z2 = 2;
var polyline = new Polyline();
var text = new ZRText();

_this.setTextGuideLine(polyline);

_this.setTextContent(text);

_this.updateData(data, idx, startAngle, true);
Expand Down Expand Up @@ -44630,8 +44627,6 @@
};

PiePiece.prototype._updateLabel = function (seriesModel, data, idx) {
var _a;

var sector = this;
var itemModel = data.getItemModel(idx);
var labelLineModel = itemModel.getModel('labelLine');
Expand Down Expand Up @@ -44660,15 +44655,21 @@
var labelPosition = seriesModel.get(['label', 'position']);

if (labelPosition !== 'outside' && labelPosition !== 'outer') {
(_a = sector.getTextGuideLine()) === null || _a === void 0 ? void 0 : _a.hide();
return;
} // Default use item visual color
sector.removeTextGuideLine();
} else {
var polyline = this.getTextGuideLine();

if (!polyline) {
polyline = new Polyline();
this.setTextGuideLine(polyline);
} // Default use item visual color

setLabelLineStyle(this, getLabelLineStatesModels(itemModel), {
stroke: visualColor,
opacity: retrieve3(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1)
});

setLabelLineStyle(this, getLabelLineStatesModels(itemModel), {
stroke: visualColor,
opacity: retrieve3(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1)
});
}
};

return PiePiece;
Expand Down Expand Up @@ -54046,26 +54047,20 @@
return CSS_TRANSITION_VENDOR + ':' + transitionText;
}

function assembleTransform(el, x, y, toString) {
function assembleTransform(x, y, toString) {
// If using float on style, the final width of the dom might
// keep changing slightly while mouse move. So `toFixed(0)` them.
var x0;
var y0; // not support transform, use `left` and `top` instead.
var x0 = x.toFixed(0) + 'px';
var y0 = y.toFixed(0) + 'px'; // not support transform, use `left` and `top` instead.

if (!env.transformSupported) {
x0 = x.toFixed(0);
y0 = y.toFixed(0);
return toString ? "top:" + y0 + "px;left:" + x0 + "px;" : [['top', y0 + "px"], ['left', x0 + "px"]];
return toString ? "top:" + y0 + ";left:" + x0 + ";" : [['top', y0], ['left', x0]];
} // support transform
// FIXME: the padding of parent element will affect the position of tooltip


var stl = getComputedStyle(el.parentElement);
x0 = (x - parseInt(stl.paddingLeft, 10)).toFixed(0);
y0 = (y - parseInt(stl.paddingTop, 10)).toFixed(0);
var is3d = env.transform3dSupported;
var translate = "translate" + (is3d ? '3d' : '') + "(" + x0 + "px," + y0 + "px" + (is3d ? ',0' : '') + ")";
return toString ? CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [[TRANSFORM_VENDOR, translate]];
var translate = "translate" + (is3d ? '3d' : '') + "(" + x0 + "," + y0 + (is3d ? ',0' : '') + ")";
return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]];
}
/**
* @param {Object} textStyle
Expand Down Expand Up @@ -54190,8 +54185,7 @@
if (appendToBody) {
document.body.appendChild(el);
} else {
// PENDING
container.prepend(el);
container.appendChild(el);
}

this._container = container; // FIXME
Expand Down Expand Up @@ -54274,7 +54268,7 @@
style.display = 'none';
} else {
style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide) // initial transform
+ assembleTransform(el, styleCoord[0], styleCoord[1], true) + ("border-color:" + convertToColorString(nearPointColor) + ";") + (tooltipModel.get('extraCssText') || '') // If mouse occasionally move over the tooltip, a mouseout event will be
+ assembleTransform(styleCoord[0], styleCoord[1], true) + ("border-color:" + convertToColorString(nearPointColor) + ";") + (tooltipModel.get('extraCssText') || '') // If mouse occasionally move over the tooltip, a mouseout event will be
// triggered by canvas, and cause some unexpectable result like dragging
// stop, "unfocusAdjacency". Here `pointer-events: none` is used to solve
// it. Although it is not supported by IE8~IE10, fortunately it is a rare
Expand Down Expand Up @@ -54331,7 +54325,7 @@

if (styleCoord[0] != null && styleCoord[1] != null) {
var style_1 = this.el.style;
var transforms = assembleTransform(this.el, styleCoord[0], styleCoord[1]);
var transforms = assembleTransform(styleCoord[0], styleCoord[1]);
each(transforms, function (transform) {
style_1[transform[0]] = transform[1];
});
Expand Down
2 changes: 1 addition & 1 deletion dist/echarts.common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/echarts.common.min.js

Large diffs are not rendered by default.

80 changes: 39 additions & 41 deletions dist/echarts.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -29260,7 +29260,7 @@ var isFunction$1 = isFunction;
var isObject$2 = isObject;
var indexOf$1 = indexOf;
var hasWindow = typeof window !== 'undefined';
var version$1 = '5.1.0';
var version$1 = '5.1.1';
var dependencies = {
zrender: '5.1.0'
};
Expand Down Expand Up @@ -44836,11 +44836,8 @@ function (_super) {
var _this = _super.call(this) || this;

_this.z2 = 2;
var polyline = new Polyline();
var text = new ZRText();

_this.setTextGuideLine(polyline);

_this.setTextContent(text);

_this.updateData(data, idx, startAngle, true);
Expand Down Expand Up @@ -44939,8 +44936,6 @@ function (_super) {
};

PiePiece.prototype._updateLabel = function (seriesModel, data, idx) {
var _a;

var sector = this;
var itemModel = data.getItemModel(idx);
var labelLineModel = itemModel.getModel('labelLine');
Expand Down Expand Up @@ -44969,15 +44964,21 @@ function (_super) {
var labelPosition = seriesModel.get(['label', 'position']);

if (labelPosition !== 'outside' && labelPosition !== 'outer') {
(_a = sector.getTextGuideLine()) === null || _a === void 0 ? void 0 : _a.hide();
return;
} // Default use item visual color
sector.removeTextGuideLine();
} else {
var polyline = this.getTextGuideLine();

if (!polyline) {
polyline = new Polyline();
this.setTextGuideLine(polyline);
} // Default use item visual color

setLabelLineStyle(this, getLabelLineStatesModels(itemModel), {
stroke: visualColor,
opacity: retrieve3(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1)
});

setLabelLineStyle(this, getLabelLineStatesModels(itemModel), {
stroke: visualColor,
opacity: retrieve3(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1)
});
}
};

return PiePiece;
Expand Down Expand Up @@ -49667,13 +49668,11 @@ function () {
// location calculation.

var regionGroup = nameMap.get(regionName);
var hasRegionGroup = !!regionGroup;

if (!regionGroup) {
if (!hasRegionGroup) {
regionGroup = nameMap.set(regionName, new Group());
regionsGroup.add(regionGroup);
resetEventTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel, dataIdx);
resetTooltipForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);
resetStateTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);
}

var compoundPath = new CompoundPath({
Expand All @@ -49683,6 +49682,14 @@ function () {
}
});
regionGroup.add(compoundPath);

if (!hasRegionGroup) {
// ensure children have been added to group before calling resetEventTriggerForRegion
resetEventTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel, dataIdx);
resetTooltipForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);
resetStateTriggerForRegion(viewBuildCtx, regionGroup, regionName, regionModel, mapOrGeoModel);
}

each(region.geometries, function (geometry) {
if (geometry.type !== 'polygon') {
return;
Expand Down Expand Up @@ -50279,7 +50286,7 @@ function (_super) {
}

regionGroup.onHoverStateChange = function (toState) {
circle.useState(toState);
setStatesFlag(circle, toState);
};
}

Expand Down Expand Up @@ -51378,10 +51385,10 @@ function (_super) {
color: 'rgba(255,215,0,0.8)'
}
},
regions: [],
tooltip: {
show: false
}
regions: [] // tooltip: {
// show: false
// }

};
return GeoModel;
}(ComponentModel);
Expand Down Expand Up @@ -65160,8 +65167,6 @@ function (_super) {
return EffectSymbol;
}(Group);

inherits(EffectSymbol, Group);

var EffectScatterView =
/** @class */
function (_super) {
Expand Down Expand Up @@ -80150,26 +80155,20 @@ function assembleTransition(duration, onlyFade) {
return CSS_TRANSITION_VENDOR + ':' + transitionText;
}

function assembleTransform(el, x, y, toString) {
function assembleTransform(x, y, toString) {
// If using float on style, the final width of the dom might
// keep changing slightly while mouse move. So `toFixed(0)` them.
var x0;
var y0; // not support transform, use `left` and `top` instead.
var x0 = x.toFixed(0) + 'px';
var y0 = y.toFixed(0) + 'px'; // not support transform, use `left` and `top` instead.

if (!env.transformSupported) {
x0 = x.toFixed(0);
y0 = y.toFixed(0);
return toString ? "top:" + y0 + "px;left:" + x0 + "px;" : [['top', y0 + "px"], ['left', x0 + "px"]];
return toString ? "top:" + y0 + ";left:" + x0 + ";" : [['top', y0], ['left', x0]];
} // support transform
// FIXME: the padding of parent element will affect the position of tooltip


var stl = getComputedStyle(el.parentElement);
x0 = (x - parseInt(stl.paddingLeft, 10)).toFixed(0);
y0 = (y - parseInt(stl.paddingTop, 10)).toFixed(0);
var is3d = env.transform3dSupported;
var translate = "translate" + (is3d ? '3d' : '') + "(" + x0 + "px," + y0 + "px" + (is3d ? ',0' : '') + ")";
return toString ? CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [[TRANSFORM_VENDOR, translate]];
var translate = "translate" + (is3d ? '3d' : '') + "(" + x0 + "," + y0 + (is3d ? ',0' : '') + ")";
return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]];
}
/**
* @param {Object} textStyle
Expand Down Expand Up @@ -80294,8 +80293,7 @@ function () {
if (appendToBody) {
document.body.appendChild(el);
} else {
// PENDING
container.prepend(el);
container.appendChild(el);
}

this._container = container; // FIXME
Expand Down Expand Up @@ -80378,7 +80376,7 @@ function () {
style.display = 'none';
} else {
style.cssText = gCssText + assembleCssText(tooltipModel, !this._firstShow, this._longHide) // initial transform
+ assembleTransform(el, styleCoord[0], styleCoord[1], true) + ("border-color:" + convertToColorString(nearPointColor) + ";") + (tooltipModel.get('extraCssText') || '') // If mouse occasionally move over the tooltip, a mouseout event will be
+ assembleTransform(styleCoord[0], styleCoord[1], true) + ("border-color:" + convertToColorString(nearPointColor) + ";") + (tooltipModel.get('extraCssText') || '') // If mouse occasionally move over the tooltip, a mouseout event will be
// triggered by canvas, and cause some unexpectable result like dragging
// stop, "unfocusAdjacency". Here `pointer-events: none` is used to solve
// it. Although it is not supported by IE8~IE10, fortunately it is a rare
Expand Down Expand Up @@ -80435,7 +80433,7 @@ function () {

if (styleCoord[0] != null && styleCoord[1] != null) {
var style_1 = this.el.style;
var transforms = assembleTransform(this.el, styleCoord[0], styleCoord[1]);
var transforms = assembleTransform(styleCoord[0], styleCoord[1]);
each(transforms, function (transform) {
style_1[transform[0]] = transform[1];
});
Expand Down Expand Up @@ -91470,7 +91468,7 @@ use(install$K); // `dataZoom` component providing a slider bar, for example:
// dataZoom: {type: 'slider'}
// });

use(install$L); // `dataZoom` component including both `visualMapContinuous` and `visualMapPiecewise`.
use(install$L); // `visualMap` component including both `visualMapContinuous` and `visualMapPiecewise`.

use(install$P); // `visualMap` component providing continuous bar, for example:
// chart.setOption({
Expand Down
2 changes: 1 addition & 1 deletion dist/echarts.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/echarts.esm.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 786af8b

Please sign in to comment.