Skip to content

Commit 44c8bec

Browse files
committed
Updated
1 parent 85888f3 commit 44c8bec

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

‎docs/src/content/docs/en/concepts/predicates.mdx‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ The following predicates evaluate the *structure* of a node.
1919

2020
| Predicate | Arguments | Description |
2121
| --------- | ------------ | ------------------------------------------------------------------------------ |
22-
| `Height` | `min`, `max` | True if the `node` is at a height of `[min..max]`. |
23-
| `Inner` | | True if the `node` is an inner node (i.e., can have children, `height > 0`). |
24-
| `Leaf` | | True if the `node` is a leaf node (i.e., cannot have children, `height == 0`). |
25-
| `Offset` | `min`, `max` | True if the `node`'s offset is in `[min..max]`. |
22+
| `Height` | `min`, `max` | `node`'s height is in `[min..max]`. |
23+
| `Inner` | | `node` is an inner node (i.e., can have children, `height > 0`). |
24+
| `Leaf` | | `node` is a leaf node (i.e., cannot have children, `height == 0`). |
25+
| `Offset` | `min`, `max` | `node`'s offset is in `[min..max]`. |
2626

2727
Below you can find a binary tree diagram to illustrate when the different predicates return true.
2828

@@ -86,13 +86,17 @@ These predicates evaluate a node based on its position relative to a target node
8686

8787
These predicates evaluate the physical intersection between a node and a given geometry.
8888

89+
<div class="middle-align-table">
90+
8991
| Predicate | Diagram | Arguments | Description |
9092
| --- | :---: | :---: | --- |
9193
| `Contains` | <svg width="80" height="50" viewBox="0 0 80 50" xmlns="http://www.w3.org/2000/svg"><circle cx="40" cy="25" r="22" fill="#3b82f6" fill-opacity="0.2" stroke="#3b82f6" stroke-width="2"/><circle cx="40" cy="25" r="10" fill="#ef4444" fill-opacity="0.2" stroke="#ef4444" stroke-width="2"/><text x="40" y="28" font-size="10" text-anchor="middle" fill="currentColor">G</text><text x="40" y="12" font-size="10" text-anchor="middle" fill="#3b82f6">N</text></svg> | `geometry` | True if the `node` contains the `geometry`. |
9294
| `Disjoint` | <svg width="80" height="50" viewBox="0 0 80 50" xmlns="http://www.w3.org/2000/svg"><circle cx="22" cy="25" r="15" fill="#3b82f6" fill-opacity="0.2" stroke="#3b82f6" stroke-width="2"/><circle cx="58" cy="25" r="15" fill="#ef4444" fill-opacity="0.2" stroke="#ef4444" stroke-width="2"/><text x="22" y="28" font-size="10" text-anchor="middle" fill="#3b82f6">N</text><text x="58" y="28" font-size="10" text-anchor="middle" fill="#ef4444">G</text></svg> | `geometry` | True if the `node` is disjoint from the `geometry`. |
9395
| `Intersects` | <svg width="80" height="50" viewBox="0 0 80 50" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="25" r="18" fill="#3b82f6" fill-opacity="0.2" stroke="#3b82f6" stroke-width="2"/><circle cx="50" cy="25" r="18" fill="#ef4444" fill-opacity="0.2" stroke="#ef4444" stroke-width="2"/><text x="23" y="28" font-size="10" text-anchor="middle" fill="#3b82f6">N</text><text x="57" y="28" font-size="10" text-anchor="middle" fill="#ef4444">G</text></svg> | `geometry` | True if the `node` intersects with the `geometry`. |
9496
| `Inside` | <svg width="80" height="50" viewBox="0 0 80 50" xmlns="http://www.w3.org/2000/svg"><circle cx="40" cy="25" r="22" fill="#ef4444" fill-opacity="0.2" stroke="#ef4444" stroke-width="2"/><circle cx="40" cy="25" r="10" fill="#3b82f6" fill-opacity="0.2" stroke="#3b82f6" stroke-width="2"/><text x="40" y="28" font-size="10" text-anchor="middle" fill="currentColor">N</text><text x="40" y="12" font-size="10" text-anchor="middle" fill="#ef4444">G</text></svg> | `geometry` | True if the `node` is inside the `geometry`. |
9597

98+
</div>
99+
96100
### Coordinates
97101

98102
| Predicate | Arguments | Description |

‎docs/src/styles/custom.css‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,15 @@
77

88
.katex-html svg {
99
height: inherit;
10+
}
11+
12+
/* Force Mermaid containers and their SVGs to be transparent */
13+
.mermaid,
14+
.mermaid svg {
15+
background-color: transparent !important;
16+
}
17+
18+
/* Vertically center the contents of table data cells */
19+
.middle-align-table td {
20+
vertical-align: middle;
1021
}

0 commit comments

Comments
 (0)