(
forceLayout: GraphSeriesModel['forceLayout'],
api: ExtensionAPI,
layoutAnimation?: boolean
)
| 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'] |
no test coverage detected