diff --git a/src/app/pages/about/about.component.html b/src/app/pages/about/about.component.html index 4259910..86ff8c6 100644 --- a/src/app/pages/about/about.component.html +++ b/src/app/pages/about/about.component.html @@ -66,7 +66,7 @@ -

{{ 'ABOUT.SECTION.EXPERIENCE' | translate }}

+

{{ 'ABOUT.SECTION.EXPERIENCE' | translate }}

@for (entry of xpKeys; track entry.key) {
diff --git a/src/app/pages/about/about.component.scss b/src/app/pages/about/about.component.scss index 3957ca7..50e8d79 100644 --- a/src/app/pages/about/about.component.scss +++ b/src/app/pages/about/about.component.scss @@ -47,7 +47,6 @@ /* Skills block */ .skills { padding: 5px; - h2 { margin-top: .25rem; margin-left: .25rem; } .chip-groups { margin-left: .25rem; @@ -64,11 +63,7 @@ /* Experience block */ .experience { padding: 5px; - h2 { margin-top: .25rem;margin-left: .25rem; } - .xp-list { - margin-left: .25rem; - display: grid; gap: .75rem; - } + h2 { margin-top: .25rem; margin-left: .25rem; } .xp-item { .xp-head { display:flex; align-items:baseline; gap:.5rem; diff --git a/src/app/pages/algorithms/pathfinding/pathfinding.component.html b/src/app/pages/algorithms/pathfinding/pathfinding.component.html index 931dcf3..1c1c6b4 100644 --- a/src/app/pages/algorithms/pathfinding/pathfinding.component.html +++ b/src/app/pages/algorithms/pathfinding/pathfinding.component.html @@ -23,8 +23,8 @@
- - + +
diff --git a/src/app/pages/algorithms/pathfinding/pathfinding.component.ts b/src/app/pages/algorithms/pathfinding/pathfinding.component.ts index c6ed385..bcd5a16 100644 --- a/src/app/pages/algorithms/pathfinding/pathfinding.component.ts +++ b/src/app/pages/algorithms/pathfinding/pathfinding.component.ts @@ -136,7 +136,7 @@ export class PathfindingComponent implements AfterViewInit { this.drawGrid(); } - visualizeDijkstra(): void { + visualize(algorithm: string): void { if (!this.ensureStartAndEnd()) { return; } @@ -145,33 +145,28 @@ export class PathfindingComponent implements AfterViewInit { this.clearPath(); const startTime = performance.now(); - const result = this.pathfindingService.dijkstra( - this.grid, - this.grid[this.startNode!.row][this.startNode!.col], - this.grid[this.endNode!.row][this.endNode!.col] - ); - const endTime = performance.now(); + let result; - this.pathLength = result.nodesInShortestPathOrder.length; - this.executionTime = endTime - startTime; + switch (algorithm) { + case 'dijkstra': result = this.pathfindingService.dijkstra( + this.grid, + this.grid[this.startNode!.row][this.startNode!.col], + this.grid[this.endNode!.row][this.endNode!.col] + ); + break; + case 'astar': result = this.pathfindingService.aStar( + this.grid, + this.grid[this.startNode!.row][this.startNode!.col], + this.grid[this.endNode!.row][this.endNode!.col] + ); + break; + } - this.animateAlgorithm(result.visitedNodesInOrder, result.nodesInShortestPathOrder); - } - - visualizeAStar(): void { - if (!this.ensureStartAndEnd()) { + if (!result) + { return; } - this.stopAnimations(); - this.clearPath(); - - const startTime = performance.now(); - const result = this.pathfindingService.aStar( - this.grid, - this.grid[this.startNode!.row][this.startNode!.col], - this.grid[this.endNode!.row][this.endNode!.col] - ); const endTime = performance.now(); this.pathLength = result.nodesInShortestPathOrder.length;