(node1: INode, node2: INode)
| 1452 | TheSame = 0, |
| 1453 | } |
| 1454 | export function comparePosition(node1: INode, node2: INode): PositionNO { |
| 1455 | if (node1 === node2) { |
| 1456 | return PositionNO.TheSame; |
| 1457 | } |
| 1458 | const l1 = node1.zLevel; |
| 1459 | const l2 = node2.zLevel; |
| 1460 | if (l1 === l2) { |
| 1461 | return PositionNO.BeforeOrAfter; |
| 1462 | } |
| 1463 | |
| 1464 | let p: any; |
| 1465 | if (l1 < l2) { |
| 1466 | p = getZLevelTop(node2, l1); |
| 1467 | if (p && p === node1) { |
| 1468 | return PositionNO.Contains; |
| 1469 | } |
| 1470 | return PositionNO.BeforeOrAfter; |
| 1471 | } |
| 1472 | |
| 1473 | p = getZLevelTop(node1, l2); |
| 1474 | if (p && p === node2) { |
| 1475 | return PositionNO.ContainedBy; |
| 1476 | } |
| 1477 | |
| 1478 | return PositionNO.BeforeOrAfter; |
| 1479 | } |
| 1480 | |
| 1481 | export function insertChild( |
| 1482 | container: INode, |
no test coverage detected
searching dependent graphs…