MCPcopy Index your code
hub / github.com/simstudioai/sim / queueRender

Method queueRender

apps/sim/lib/pptx-renderer/core/viewer.ts:500–543  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

498 }
499
500 private async queueRender(): Promise<void> {
501 this.renderChain = this.renderChain.then(async () => {
502 if (!this.presentation) return
503 this.emitRenderStart()
504 try {
505 const { scale, displayWidth, displayHeight } = this.getDisplayMetrics()
506
507 this.cleanupScrollObserver?.()
508 this.cleanupScrollObserver = undefined
509 this.cleanupListMount?.()
510 this.cleanupListMount = undefined
511 this.ensureListSlideMountedFn = undefined
512 this.mountedSlides.clear()
513 for (const handle of this.slideHandles.values()) {
514 handle.dispose()
515 }
516 this.slideHandles.clear()
517 this.disposeAllCharts()
518 this.container.innerHTML = ''
519 this.container.style.position = 'relative'
520
521 if (this.activeRenderMode === 'slide') {
522 this.renderSingleSlide(scale, displayWidth, displayHeight)
523 } else if (this.listOptions.windowed) {
524 await this.renderAllSlidesWindowed(scale, displayWidth, displayHeight)
525 } else {
526 await this.renderAllSlidesFull(scale, displayWidth, displayHeight)
527 }
528
529 // Post-render width correction: appending slides may cause a scrollbar
530 // to appear on the page, narrowing the container. If the measured width
531 // changed, patch wrapper sizes and scale transforms in-place so content
532 // is not clipped by the (now narrower) container.
533 if (this.activeRenderMode !== 'slide') {
534 this.correctListMetricsIfNeeded()
535 }
536
537 this.emitSlideChange(this.currentSlide)
538 } finally {
539 this.emitRenderComplete()
540 }
541 })
542 return this.renderChain
543 }
544
545 private handleContainerResize(): void {
546 if (!this.presentation) return

Callers 5

renderListMethod · 0.95
renderSlideMethod · 0.95
setZoomMethod · 0.95
setFitModeMethod · 0.95
handleContainerResizeMethod · 0.95

Calls 11

emitRenderStartMethod · 0.95
getDisplayMetricsMethod · 0.95
disposeAllChartsMethod · 0.95
renderSingleSlideMethod · 0.95
renderAllSlidesFullMethod · 0.95
emitSlideChangeMethod · 0.95
emitRenderCompleteMethod · 0.95
clearMethod · 0.65
disposeMethod · 0.65

Tested by

no test coverage detected