MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / bindRenderedEvent

Function bindRenderedEvent

libs/echarts/echarts.simple.js:28470–28491  ·  view source on GitHub ↗

* Event `rendered` is triggered when zr * rendered. It is useful for realtime * snapshot (reflect animation). * * Event `finished` is triggered when: * (1) zrender rendering finished. * (2) initial animation finished. * (3) progressive rendering finished. * (4) no pending action. * (5) no d

(zr, ecIns)

Source from the content-addressed store, hash-verified

28468 * (5) no delayed setOption needs to be processed.
28469 */
28470function bindRenderedEvent(zr, ecIns) {
28471 zr.on('rendered', function () {
28472
28473 ecIns.trigger('rendered');
28474
28475 // The `finished` event should not be triggered repeatly,
28476 // so it should only be triggered when rendering indeed happend
28477 // in zrender. (Consider the case that dipatchAction is keep
28478 // triggering when mouse move).
28479 if (
28480 // Although zr is dirty if initial animation is not finished
28481 // and this checking is called on frame, we also check
28482 // animation finished for robustness.
28483 zr.animation.isFinished()
28484 && !ecIns[OPTION_UPDATED]
28485 && !ecIns._scheduler.unfinished
28486 && !ecIns._pendingActions.length
28487 ) {
28488 ecIns.trigger('finished');
28489 }
28490 });
28491}
28492
28493/**
28494 * @param {Object} params

Callers 1

EChartsFunction · 0.70

Calls 2

onMethod · 0.45
triggerMethod · 0.45

Tested by

no test coverage detected