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

Function getZLevelTop

packages/designer/src/document/node/node.ts:1406–1419  ·  view source on GitHub ↗
(child: INode, zLevel: number)

Source from the content-addressed store, hash-verified

1404}
1405
1406export function getZLevelTop(child: INode, zLevel: number): INode | null {
1407 let l = child.zLevel;
1408 if (l < zLevel || zLevel < 0) {
1409 return null;
1410 }
1411 if (l === zLevel) {
1412 return child;
1413 }
1414 let r: any = child;
1415 while (r && l-- > zLevel) {
1416 r = r.parent;
1417 }
1418 return r;
1419}
1420
1421/**
1422 * 测试两个节点是否为包含关系

Callers 3

getZLevelTopMethod · 0.85
containsFunction · 0.85
comparePositionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…