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

Method _doReset

src/core/task.ts:272–298  ·  view source on GitHub ↗
(skip: boolean)

Source from the content-addressed store, hash-verified

270 }
271
272 private _doReset(skip: boolean): boolean {
273 this._dueIndex = this._outputDueEnd = this._dueEnd = 0;
274 this._settedOutputEnd = null;
275
276 let progress: TaskResetCallbackReturn<Ctx>;
277 let forceFirstProgress: boolean;
278
279 if (!skip && this._reset) {
280 progress = this._reset(this.context);
281 if (progress && (progress as any).progress) {
282 forceFirstProgress = (progress as any).forceFirstProgress;
283 progress = (progress as any).progress;
284 }
285 // To simplify no progress checking, array must has item.
286 if (isArray(progress) && !progress.length) {
287 progress = null;
288 }
289 }
290
291 this._progress = progress as TaskProgressCallback<Ctx>;
292 this._modBy = this._modDataCount = null;
293
294 const downstream = this._downstream;
295 downstream && downstream.dirty();
296
297 return forceFirstProgress;
298 }
299
300 unfinished(): boolean {
301 return this._progress && this._dueIndex < this._dueEnd;

Callers 1

performMethod · 0.95

Calls 3

isArrayFunction · 0.85
_resetMethod · 0.80
dirtyMethod · 0.45

Tested by

no test coverage detected