Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor automaton + refactor file loading + add example projects + add recent projects #99

Merged
merged 56 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
abe0fc1
WIP refactor automaton
atjn Nov 8, 2023
27e4c7e
Reorder exports
atjn Nov 8, 2023
d2ec368
Format
atjn Nov 8, 2023
b0561ca
Merge branch 'main' into automaton-refactor
atjn Nov 9, 2023
7db0c74
Fixes
atjn Nov 13, 2023
a33e1b5
Merge branch 'main' into automaton-refactor
atjn Nov 13, 2023
c40f780
Fix merge
atjn Nov 13, 2023
ef580de
Merge branch 'main' into automaton-refactor
atjn Nov 13, 2023
f9aa453
Plumb the new automaton into components
atjn Nov 13, 2023
8f702d9
Minor fix fix
atjn Nov 13, 2023
21262f7
More plumbing
atjn Nov 13, 2023
78f421f
Plumbing lintings
atjn Nov 13, 2023
0dfa9b9
Merge branch 'main' into automaton-refactor
atjn Nov 16, 2023
42d1f03
fs load and save
TSKsmiley Nov 20, 2023
30f8233
Fix file adapter instantiation
TSKsmiley Nov 20, 2023
dad5c7f
Fix file adapter implementation
TSKsmiley Nov 20, 2023
8dd9a02
Refactor file adapter classes
TSKsmiley Nov 20, 2023
a75739d
Merge branch 'main' into automaton-refactor
atjn Nov 20, 2023
f932049
Refactor fileAdapter imports and add console log
TSKsmiley Nov 20, 2023
16e320f
Fix FileAdapter
atjn Nov 21, 2023
61532ac
Streamline automata
atjn Nov 21, 2023
7f8d87a
lintings
atjn Nov 21, 2023
b0b9899
Merge branch 'main' into automaton-refactor
atjn Nov 22, 2023
055f4cd
new file system fallback
TSKsmiley Nov 22, 2023
e2cea72
code clean up
TSKsmiley Nov 22, 2023
ceeecb0
Saving not supported error in browser
TSKsmiley Nov 23, 2023
99ec3b5
Minor automaton fixes
atjn Nov 27, 2023
5ae5e74
Improve filesystem adapters
atjn Nov 27, 2023
2ca0043
Add project examples
atjn Nov 27, 2023
652bbb3
Use file adapters in frontend
atjn Nov 27, 2023
c4bb532
Smol fix
atjn Nov 27, 2023
d98a6ed
Merge branch 'main' into automaton-refactor
atjn Nov 27, 2023
1c4dac4
Merge fix
atjn Nov 27, 2023
2db034d
submodule
TSKsmiley Nov 27, 2023
e8a85bd
Fix linting
atjn Nov 27, 2023
feda581
fix fix
atjn Nov 27, 2023
c77fad8
Remove legacy code
atjn Nov 27, 2023
f86f513
Fix type warnings in idmap
atjn Nov 27, 2023
fc367e3
Explain some regexes
atjn Nov 27, 2023
e7e60dd
Remove unnecessary raw constraint
atjn Nov 27, 2023
23e8530
Add constraint on Id input type
atjn Nov 27, 2023
a8d3b9b
Deal with undefined rawLocation
atjn Nov 27, 2023
d8565ea
lint
atjn Nov 27, 2023
a51cacb
Fix array instantiation issue
atjn Nov 29, 2023
6b02273
Fix automaton tests
atjn Nov 29, 2023
76190bb
Fix recent project type incompatibility
atjn Nov 29, 2023
a33972a
Fix lint
atjn Nov 29, 2023
dfb987c
Fixed-Testing
TSKsmiley Nov 29, 2023
d9d31ee
Merge branch 'automaton-refactor' of github.com:ECDAR-AAU-SW-P5/Ecdar…
TSKsmiley Nov 29, 2023
06f11c3
Fix unit test
atjn Nov 29, 2023
aaeddbe
Add todo's
atjn Nov 29, 2023
32d90e8
Make submodule more accessible
atjn Nov 29, 2023
b7f1229
updated to latest lts
TSKsmiley Nov 29, 2023
1ce284d
yarn does this by default
TSKsmiley Nov 29, 2023
d20ff44
changed minimum version to 20.x.x
TSKsmiley Nov 29, 2023
65207d1
Resolve review issues
atjn Nov 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix merge
  • Loading branch information
atjn committed Nov 13, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c40f780da0c13e6541b304400df4b42bf8e37f11
18 changes: 8 additions & 10 deletions src/lib/components/svg-view/SvgView.svelte
Original file line number Diff line number Diff line change
@@ -2,21 +2,19 @@
import { onMount } from "svelte";
import {
activeView,
type TActiveView,
type ActiveView,
} from "$lib/globalState/activeProject";
import { locationRecord } from "$lib/components/svg-view/state";
import { scale } from "$lib/globalState/scaleStore";
import Location from "$lib/components/svg-view/Location.svelte";
import Edge from "./Edge.svelte";
import type { SystemMemberEdge } from "$lib/classes/automaton/system/SystemMemberEdge";
import { Component } from "$lib/classes/automaton/component/Component";
import { LocationEdge } from "$lib/classes/automaton/component/LocationEdge";
import Panzoom, {
type CurrentValues,
type PanzoomChangeEvent,
} from "./panzoom/panzoom";
import {
SystemEdge,
Edge as AutomatonEdge,
Component,
} from "$lib/classes/automaton";

/**
* The parent svg element that the entire view is shown with.
@@ -64,15 +62,15 @@
}

function filterSystemEdges(
edges: SystemEdge[] | AutomatonEdge[] | undefined,
): AutomatonEdge[] {
edges: SystemMemberEdge[] | LocationEdge[] | undefined,
): LocationEdge[] {
if (!edges) return [];
return edges.filter(
(edge): edge is AutomatonEdge => edge instanceof AutomatonEdge,
(edge): edge is LocationEdge => edge instanceof LocationEdge,
);
}

function locationsAsArray(view: TActiveView) {
function locationsAsArray(view: ActiveView) {
if (view instanceof Component) {
// TODO: support more than just components
return Object.values(view.locations);