MCPcopy
hub / github.com/apache/echarts / _animateSymbol

Method _animateSymbol

src/chart/helper/EffectLine.ts:165–185  ·  view source on GitHub ↗
(
        symbol: ECSymbolOnEffectLine, period: number, delayNum: number, loop: boolean, roundTrip: boolean)

Source from the content-addressed store, hash-verified

163 }
164
165 private _animateSymbol(
166 symbol: ECSymbolOnEffectLine, period: number, delayNum: number, loop: boolean, roundTrip: boolean) {
167 if (period > 0) {
168 symbol.__t = 0;
169 const self = this;
170 const animator = symbol.animate('', loop)
171 .when(roundTrip ? period * 2 : period, {
172 __t: roundTrip ? 2 : 1
173 })
174 .delay(delayNum)
175 .during(function () {
176 self._updateSymbolPosition(symbol);
177 });
178 if (!loop) {
179 animator.done(function () {
180 self.remove(symbol);
181 });
182 }
183 animator.start();
184 }
185 }
186
187 protected _getLineLength(symbol: ECSymbolOnEffectLine) {
188 // Not so accurate

Callers 1

Calls 4

startMethod · 0.80
duringMethod · 0.65
removeMethod · 0.65
_updateSymbolPositionMethod · 0.45

Tested by

no test coverage detected