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

Method onChange

packages/shell/src/model/active-tracker.ts:31–45  ·  view source on GitHub ↗
(fn: (target: IPublicTypeActiveTarget) => void)

Source from the content-addressed store, hash-verified

29 }
30
31 onChange(fn: (target: IPublicTypeActiveTarget) => void): () => void {
32 if (!fn) {
33 return () => {};
34 }
35 return this[activeTrackerSymbol].onChange((t: ActiveTarget) => {
36 const { node: innerNode, detail, instance } = t;
37 const publicNode = ShellNode.create(innerNode);
38 const publicActiveTarget = {
39 node: publicNode!,
40 detail,
41 instance,
42 };
43 fn(publicActiveTarget);
44 });
45 }
46
47 track(node: IPublicModelNode) {
48 this[activeTrackerSymbol].track((node as any)[nodeSymbol]);

Callers

nothing calls this directly

Calls 2

onChangeMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected