MCPcopy Index your code
hub / github.com/apache/echarts / _startForceLayoutIteration

Method _startForceLayoutIteration

src/chart/graph/GraphView.ts:247–268  ·  view source on GitHub ↗
(
        forceLayout: GraphSeriesModel['forceLayout'],
        api: ExtensionAPI,
        layoutAnimation?: boolean
    )

Source from the content-addressed store, hash-verified

245 }
246
247 private _startForceLayoutIteration(
248 forceLayout: GraphSeriesModel['forceLayout'],
249 api: ExtensionAPI,
250 layoutAnimation?: boolean
251 ) {
252 const self = this;
253 let firstRendered = false;
254 (function step() {
255 forceLayout.step(function (stopped) {
256 self.updateLayout(self._model);
257 if (stopped || !firstRendered) {
258 firstRendered = true;
259 self._renderThumbnail(self._model, api, self._symbolDraw, self._lineDraw);
260 }
261 (self._layouting = !stopped) && (
262 layoutAnimation
263 ? (self._layoutTimeout = setTimeout(step, 16) as any)
264 : step()
265 );
266 });
267 })();
268 }
269
270 /**
271 * @implements RoamHostView['__updateOnOwnRoam']

Callers 1

renderMethod · 0.95

Calls 3

stepMethod · 0.80
_renderThumbnailMethod · 0.80
updateLayoutMethod · 0.65

Tested by

no test coverage detected