diff --git a/docs/config/setup/modules/mermaid.md b/docs/config/setup/modules/mermaid.md index b6a5fdb92..016831724 100644 --- a/docs/config/setup/modules/mermaid.md +++ b/docs/config/setup/modules/mermaid.md @@ -67,7 +67,7 @@ #### Defined in -[packages/mermaid/src/diagram-api/types.ts:153](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L153) +[packages/mermaid/src/diagram-api/types.ts:157](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L157) --- @@ -77,7 +77,7 @@ #### Defined in -[packages/mermaid/src/diagram-api/types.ts:155](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L155) +[packages/mermaid/src/diagram-api/types.ts:159](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/diagram-api/types.ts#L159) ## Variables @@ -88,3 +88,55 @@ #### Defined in [packages/mermaid/src/mermaid.ts:442](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/mermaid.ts#L442) + +## Functions + +### calcIntersections + +▸ **calcIntersections**(`startNodeId`, `endNodeId`, `startNodeSize`, `endNodeSize`): `IntersectionPoint`\[] + +#### Parameters + +| Name | Type | +| :-------------------- | :---------------------- | +| `startNodeId` | `string` | +| `endNodeId` | `undefined` \| `string` | +| `startNodeSize` | `NodePosition` | +| `endNodeSize` | `Object` | +| `endNodeSize.height?` | `number` | +| `endNodeSize.width?` | `number` | +| `endNodeSize.x` | `number` | +| `endNodeSize.y` | `number` | + +#### Returns + +`IntersectionPoint`\[] + +**`Throws`** + +If the start node doesn't exist in the nodeDB (e.g. `render` hasn't been called yet) + +#### Defined in + +[packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js:106](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js#L106) + +--- + +### calcNodeIntersections + +▸ **calcNodeIntersections**(`_node1`, `_node2`): `IntersectionPoint`\[] | `Promise`<`IntersectionPoint`\[]> + +#### Parameters + +| Name | Type | +| :------- | :------------------------------------------------------------------------------------------------ | +| `_node1` | `Pick`<`Node`, `"width"` \| `"height"` \| `"x"` \| `"y"` \| `"id"` \| `"shape"` \| `"intersect"`> | +| `_node2` | `Pick`<`Node`, `"width"` \| `"height"` \| `"x"` \| `"y"` \| `"id"` \| `"shape"` \| `"intersect"`> | + +#### Returns + +`IntersectionPoint`\[] | `Promise`<`IntersectionPoint`\[]> + +#### Defined in + +[packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js:78](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js#L78)