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

Function contains

packages/designer/src/document/node/node.ts:1427–1442  ·  view source on GitHub ↗
(node1: INode, node2: INode)

Source from the content-addressed store, hash-verified

1425 * @returns 是否包含
1426 */
1427export function contains(node1: INode, node2: INode): boolean {
1428 if (node1 === node2) {
1429 return true;
1430 }
1431
1432 if (!node1.isParentalNode || !node2.parent) {
1433 return false;
1434 }
1435
1436 const p = getZLevelTop(node2, node1.zLevel);
1437 if (!p) {
1438 return false;
1439 }
1440
1441 return node1 === p;
1442}
1443
1444// 16 node1 contains node2
1445// 8 node1 contained_by node2

Callers 3

getDropContainerMethod · 0.90
node.test.tsFile · 0.90
containsMethod · 0.70

Calls 1

getZLevelTopFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…