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 2019/07/31 06:59:39 UTC
[incubator-echarts] 01/02: [effectScatter] add rippleEffect.color
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 c6d660981acf6079904b9840330909937cdc1069
Author: ende93 <en...@hotmail.com>
AuthorDate: Mon Feb 18 21:06:59 2019 +0800
[effectScatter] add rippleEffect.color
---
src/chart/helper/EffectSymbol.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/chart/helper/EffectSymbol.js b/src/chart/helper/EffectSymbol.js
index 80d94da..29eb681 100644
--- a/src/chart/helper/EffectSymbol.js
+++ b/src/chart/helper/EffectSymbol.js
@@ -38,13 +38,14 @@ function normalizeSymbolSize(symbolSize) {
}
function updateRipplePath(rippleGroup, effectCfg) {
+ const color = effectCfg.rippleEffectColor || effectCfg.color
rippleGroup.eachChild(function (ripplePath) {
ripplePath.attr({
z: effectCfg.z,
zlevel: effectCfg.zlevel,
style: {
- stroke: effectCfg.brushType === 'stroke' ? effectCfg.color : null,
- fill: effectCfg.brushType === 'fill' ? effectCfg.color : null
+ stroke: effectCfg.brushType === 'stroke' ? color : null,
+ fill: effectCfg.brushType === 'fill' ? color : null
}
});
});
@@ -81,9 +82,6 @@ effectSymbolProto.startEffectAnimation = function (effectCfg) {
var rippleGroup = this.childAt(1);
for (var i = 0; i < EFFECT_RIPPLE_NUMBER; i++) {
- // var ripplePath = createSymbol(
- // symbolType, -0.5, -0.5, 1, 1, color
- // );
// If width/height are set too small (e.g., set to 1) on ios10
// and macOS Sierra, a circle stroke become a rect, no matter what
// the scale is set. So we set width/height as 2. See #4136.
@@ -198,6 +196,7 @@ effectSymbolProto.updateData = function (data, idx) {
effectCfg.zlevel = itemModel.getShallow('zlevel') || 0;
effectCfg.symbolType = symbolType;
effectCfg.color = color;
+ effectCfg.rippleEffectColor = itemModel.get('rippleEffect.color')
this.off('mouseover').off('mouseout').off('emphasis').off('normal');
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org