* Update effect symbol
(effectCfg: RippleEffectCfg)
| 122 | * Update effect symbol |
| 123 | */ |
| 124 | updateEffectAnimation(effectCfg: RippleEffectCfg) { |
| 125 | const oldEffectCfg = this._effectCfg; |
| 126 | const rippleGroup = this.childAt(1) as Group; |
| 127 | |
| 128 | // Must reinitialize effect if following configuration changed |
| 129 | const DIFFICULT_PROPS = ['symbolType', 'period', 'rippleScale', 'rippleNumber'] as const; |
| 130 | for (let i = 0; i < DIFFICULT_PROPS.length; i++) { |
| 131 | const propName = DIFFICULT_PROPS[i]; |
| 132 | if (oldEffectCfg[propName] !== effectCfg[propName]) { |
| 133 | this.stopEffectAnimation(); |
| 134 | this.startEffectAnimation(effectCfg); |
| 135 | return; |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | updateRipplePath(rippleGroup, effectCfg); |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Highlight symbol |
no test coverage detected