mirror of
https://github.com/ParkerTenBroeck/automata.git
synced 2026-06-06 21:24:06 -04:00
moved frontend to event driven bus, added more simulation stuff
This commit is contained in:
parent
c7309a75d9
commit
8c8bb103b2
17 changed files with 767 additions and 493 deletions
|
|
@ -10,9 +10,9 @@ export type Category =
|
|||
| "NTM";
|
||||
|
||||
export class Example {
|
||||
category: Category;
|
||||
title: string;
|
||||
machine: string;
|
||||
readonly category: Category;
|
||||
readonly title: string;
|
||||
readonly machine: string;
|
||||
|
||||
constructor(category: Category, title: string, machine: string) {
|
||||
this.category = category;
|
||||
|
|
@ -21,7 +21,7 @@ export class Example {
|
|||
}
|
||||
}
|
||||
|
||||
export const examples: Example[] = [
|
||||
export const examples: readonly Example[] = [
|
||||
new Example(
|
||||
"Tutorial",
|
||||
"DFA",
|
||||
|
|
@ -174,7 +174,7 @@ const CATEGORY_ORDER: Category[] = [
|
|||
|
||||
function buildExamplesDropdown(
|
||||
selectEl: HTMLSelectElement,
|
||||
examples: Example[],
|
||||
examples: readonly Example[],
|
||||
onPick?: (ex: Example) => void,
|
||||
) {
|
||||
// Clear everything except the first placeholder option (if present)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue