Skip to content

Commit 56c9fcd

Browse files
Minor cleanup
1 parent 3b52f49 commit 56c9fcd

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

frontend/src/app/annotate/annotation-parse-results/parse-tree-table/parse-tree-highlight.directive.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ export class ParseTreeHighlightDirective implements AfterViewInit, OnDestroy {
7474
private onCellMouseEnter(hoveredCell: CellPosition): void {
7575
// Clear previous highlights
7676
this.clearHighlights();
77-
77+
78+
// Highlight the hovered cell.
7879
this.renderer.addClass(hoveredCell.element, 'highlight');
7980

80-
// Highlight child cells (in rows above) that are contained within the hovered cell's column range
81+
// Highlight child cells (in rows above).
8182
this.cellPositions.forEach(cellPos => {
8283
if (cellPos.rowIndex >= hoveredCell.rowIndex) {
8384
// Cell is on a row below or the same as the hovered cell.

frontend/src/app/annotate/annotation-parse-results/parse-tree-table/parse-tree-table.component.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ <h3 class="h5 fw-bold">{{ getTreeTypeDisplay(tree().type) }}</h3>
4242
}
4343

4444
@case ('var') {
45-
<div class="leaf-cell">
46-
<strong>{{ cell.content }}</strong>
45+
<div class="d-flex flex-column gap-1">
46+
<strong class="h5 fw-bold mb-0">
47+
{{ cell.content }}
48+
</strong>
4749
<br />
4850
<span>{{ cell.typeInfo }}</span>
4951
</div>

frontend/src/app/annotate/annotation-parse-results/parse-tree-table/parse-tree-table.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export class ParseTreeTableComponent implements OnInit {
5050
public readonly treeTypeDisplay = signal("");
5151

5252
ngOnInit(): void {
53-
const rows = this.createTableRows(this.tree().root);
53+
const root = this.tree().root;
54+
const rows = this.createTableRows(root);
5455
this.tableRows.push(...rows);
5556
}
5657

frontend/src/app/annotate/annotation-parse-results/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export interface UnaryNode {
4242
rule?: string;
4343
}
4444

45-
// Binary node
4645
export interface BinaryNode {
4746
type: 'binary';
4847
left: ParseTreeNode;

0 commit comments

Comments
 (0)