MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / wrapWithEventSwitch

Function wrapWithEventSwitch

packages/editor-core/src/utils/control.ts:26–30  ·  view source on GitHub ↗
(fn: ListenerFunc)

Source from the content-addressed store, hash-verified

24
25type ListenerFunc = (...args: any[]) => void;
26export function wrapWithEventSwitch(fn: ListenerFunc): ListenerFunc {
27 return (...args: any[]) => {
28 if (isGlobalEventOn()) fn(...args);
29 };
30}

Callers 5

onNodeCreateMethod · 0.85
onNodeDestroyMethod · 0.85
onVisibleChangeMethod · 0.85
onChildrenChangeMethod · 0.85
onPropChangeMethod · 0.85

Calls 1

isGlobalEventOnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…