Skip to content

Commit cf83163

Browse files
authored
add missing emphasizedProperties (#238)
1 parent 0d44871 commit cf83163

File tree

3 files changed

+30
-30
lines changed

3 files changed

+30
-30
lines changed

packages/viewer/src/components/Properties/Theorems.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
$: related = $theorems.forProperty(property)
1111
</script>
1212

13-
<Theorems theorems={related} />
13+
<Theorems theorems={related} emphasizedProperties={new Set([property])} />

packages/viewer/src/components/Theorems/Converse.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
is tautologicially true
2929
{:else if proof}
3030
follows from these theorems:
31-
<Theorems theorems={proof} />
31+
<Theorems
32+
theorems={proof}
33+
emphasizedProperties={new Set(theorem.properties)}
34+
/>
3235
{:else}
3336
cannot be proven from other theorems or disproven from a counterexample.
3437
{/if}

packages/viewer/src/components/Traits/Proof.svelte

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,34 @@
77
export let space: Space
88
export let theorems: Theorem[]
99
export let traits: [Property, Trait][]
10+
$: emphasizedProperties = new Set(traits.map(([p, _]) => p))
1011
</script>
1112

1213
Automatically deduced from the following:
13-
<div class="row">
14-
<div class="col">
15-
<h5>Properties</h5>
16-
<table class="table">
17-
<thead>
14+
<div style="margin:1em 0">
15+
<h5>Properties</h5>
16+
<table class="table">
17+
<thead>
18+
<tr>
19+
<th>Property</th>
20+
<th>Value</th>
21+
</tr>
22+
</thead>
23+
<tbody>
24+
{#each traits as [property, trait] (property.id)}
1825
<tr>
19-
<th>Property</th>
20-
<th>Value</th>
26+
<td>
27+
<Link.Property {property} />
28+
</td>
29+
<td>
30+
<Link.Trait {space} {property}>
31+
<ValueIcon value={trait.value} />
32+
</Link.Trait>
33+
</td>
2134
</tr>
22-
</thead>
23-
<tbody>
24-
{#each traits as [property, trait] (property.id)}
25-
<tr>
26-
<td>
27-
<Link.Property {property} />
28-
</td>
29-
<td>
30-
<Link.Trait {space} {property}>
31-
<ValueIcon value={trait.value} />
32-
</Link.Trait>
33-
</td>
34-
</tr>
35-
{/each}
36-
</tbody>
37-
</table>
38-
</div>
39-
<div class="col">
40-
<h5>Theorems</h5>
41-
<Theorems {theorems} />
42-
</div>
35+
{/each}
36+
</tbody>
37+
</table>
38+
<h5>Theorems</h5>
39+
<Theorems {theorems} {emphasizedProperties} />
4340
</div>

0 commit comments

Comments
 (0)