MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / waitForCaptureLayoutStabilization

Function waitForCaptureLayoutStabilization

src/utils/captureLayout.ts:16–24  ·  view source on GitHub ↗
(options?: CaptureLayoutStabilizationOptions)

Source from the content-addressed store, hash-verified

14}
15
16export async function waitForCaptureLayoutStabilization(options?: CaptureLayoutStabilizationOptions): Promise<void> {
17 const waitFrame = options?.waitFrame ?? waitAnimationFrame
18 const dispatchResize = options?.dispatchResize ?? dispatchWindowResize
19
20 // 截图前会临时修改 padding/overflow,先等一次布局完成,再通知 ECharts 按新容器宽度重绘。
21 await waitFrame()
22 dispatchResize()
23 await waitFrame()
24}

Callers 2

captureElementFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected