Commit Graph

15 Commits

Author SHA1 Message Date
e1680426ad Update sorting.service.ts 2026-02-04 15:01:36 +01:00
beb5bb7db1 Add sorting explanations, wiki links, and i18n
Introduce Bubble, Quick and Heap Sort documentation: add wiki URL constants, update sorting component to show Bubble/Quick/Heap Sort explanations with Wikipedia links, and include additional disclaimer text and list in the UI. Add corresponding i18n entries in English and German containing algorithm descriptions, note/title and several disclaimer lines.
2026-02-04 14:19:27 +01:00
a10f62f2dd Refactor pathfinding/sorting UI and update i18n
Replace plain container with Angular Material mat-card in pathfinding view and reorganize UI: add mat-card header/content, algorithm explanation block, control buttons, node-type toggle group, grid-size inputs, legend and results display (path length & execution time). Import and wire MatCard modules in the pathfinding component. Move .algo-info styling from the component SCSS into global styles.scss and remove it from the component stylesheet. Update sorting template to use new SORTING translation keys and add an UrlConstants reference in the sorting component TS for external links. Add/adjust i18n keys in en.json and de.json for sorting and grid labels to match the updated templates.
2026-02-04 12:17:54 +01:00
450ab0b837 Implement snapshot-based sorting visualizer
Refactor sorting to produce and consume SortSnapshot sequences for visualization. SortingService now creates immutable snapshots and implements bubble, quick and heap sorts (with helper methods) instead of performing UI delays; a swap/heapify/partition flow records state changes. SortingComponent was updated to animate snapshots (with start/stop timeout handling), added array size input and controls, stores an unsorted copy for resets, and uses ChangeDetectorRef for updates. Minor UI tweaks: faster bar transitions, info color, updated default array size and animation speed, and added i18n keys for ARRAY_SIZE (en/de).
2026-02-04 11:37:11 +01:00
cbc46cf858 initial implementation of sorting algorithms 2026-02-04 09:22:05 +01:00
e195e93f1a Add touch support to pathfinding canvas
Register touch event handlers (touchstart, touchmove, touchend) that call existing mouse handlers and prevent default scrolling (passive: false) so the canvas can be interacted with on touch devices. Update getGridPosition to accept TouchEvent or MouseEvent, read touch coordinates, and apply canvas-to-CSS scaling (canvas.width/rect.width and canvas.height/rect.height) to correctly map client coordinates to grid cells. This enables accurate touch interaction and handles high-DPI / CSS-scaled canvases.
2026-02-04 08:35:41 +01:00
668640dcc6 Adjusted small things, norhting serious 2026-02-02 10:44:13 +01:00
e0f0a0ed04 Enhance pathfinding UI with grid resizing and scenarios
Added controls for dynamic grid size adjustment and scenario presets (normal and edge case) to the pathfinding component. Improved UI/UX with algorithm explanations, Wikipedia links, and reorganized controls. Refactored grid logic for flexibility, updated translations, and improved code structure for maintainability.
2026-02-02 10:06:59 +01:00
17a787b0f1 Small refactoring for better readabilty 2026-02-02 09:28:05 +01:00
01f66d4b8f Fixed smaller rounting bugs 2026-02-02 08:56:51 +01:00
3a13d62c9e Remove particles background and update routing
Deleted the particles background component and its related files. Updated routing logic and constants, refactored topbar and algorithms pages, and performed dependency updates and cleanup in package files. Also improved i18n translations and adjusted TypeScript configuration.
2026-02-02 08:51:10 +01:00
1ce7927f14 Remove 'Clear Path' button and translation keys
Deleted the 'Clear Path' button from the pathfinding component and removed its associated translation entries from both English and German i18n files.
2026-02-01 17:08:55 +01:00
2d25b568f5 Add ESLint integration and Angular linting support
Configured ESLint for the project with Angular and TypeScript support. Added angular-eslint dependencies, updated angular.json to include linting, and created eslint.config.js for lint rules. Updated package.json and package-lock.json with new dev dependencies.
2026-02-01 17:04:07 +01:00
b0ad2dc3d1 Update pathfinding.component.ts 2026-02-01 16:18:55 +01:00
17db997398 Add algorithms section with pathfinding visualizer
Introduces a new 'Algorithms' section, replacing the previous 'Hobbies' page. Adds components, services, and models for algorithm categories and a pathfinding visualizer supporting Dijkstra and A* algorithms. Updates navigation and i18n files to reflect the new section and removes all hobbies-related files.
2026-02-01 16:00:10 +01:00