MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / wireCompositionEvents

Function wireCompositionEvents

packages/sdk-playground/src/main.ts:1046–1057  ·  view source on GitHub ↗
(c: Composition)

Source from the content-addressed store, hash-verified

1044}
1045
1046function wireCompositionEvents(c: Composition) {
1047 c.on("patch", (e) => {
1048 patchCount++;
1049 logEntry(`patch #${patchCount}`, e.patches);
1050 schedulePreviewUpdate();
1051 renderElementList();
1052 renderInspectorContent();
1053 renderTimeline();
1054 });
1055 c.on("persist:error", (e) => logEntry("persist:error", e));
1056 c.on("selectionchange", onSelectionChange);
1057}
1058
1059function onSelectionChange(ids: string[]) {
1060 const id = ids[0] ?? null;

Callers 1

openEditorFunction · 0.85

Calls 6

logEntryFunction · 0.85
schedulePreviewUpdateFunction · 0.85
renderElementListFunction · 0.85
renderInspectorContentFunction · 0.85
renderTimelineFunction · 0.85
onMethod · 0.65

Tested by

no test coverage detected