Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Knowledge Space WP Plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alg
Knowledge Space WP Plugin
Commits
35c363ad
Commit
35c363ad
authored
3 years ago
by
Maximilian Giller
Browse files
Options
Downloads
Patches
Plain Diff
Fixed undo/redo
parent
a97b8424
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
editor/js/graph.js
+13
-5
13 additions, 5 deletions
editor/js/graph.js
with
13 additions
and
5 deletions
editor/js/graph.js
+
13
−
5
View file @
35c363ad
...
...
@@ -65,7 +65,7 @@ export class Graph extends ManagedData {
}
getLinkColor
(
link
)
{
return
this
.
getLinkTypeColor
(
link
[
LINK_TYPE
])
return
this
.
getLinkTypeColor
(
link
[
LINK_TYPE
])
;
}
getLinkTypeColor
(
linkClass
)
{
...
...
@@ -223,10 +223,18 @@ export class Graph extends ManagedData {
getCleanLink
(
link
,
simulationParameters
)
{
var
cleanLink
=
{};
// Source and target nodes
// Node ids will be converted to complete node objects on running graphs, gotta convert back
cleanLink
[
LINK_SOURCE
]
=
link
[
LINK_SOURCE
][
NODE_ID
];
cleanLink
[
LINK_TARGET
]
=
link
[
LINK_TARGET
][
NODE_ID
];
// Assuming that all nodes are valid, there are two possible formats
// 1. source and target are node objects
if
(
link
[
LINK_SOURCE
][
NODE_ID
]
!==
undefined
)
{
// Source and target nodes
// Node ids will be converted to complete node objects on running graphs, gotta convert back
cleanLink
[
LINK_SOURCE
]
=
link
[
LINK_SOURCE
][
NODE_ID
];
cleanLink
[
LINK_TARGET
]
=
link
[
LINK_TARGET
][
NODE_ID
];
}
else
{
// 2. source and target are just node ids
cleanLink
[
LINK_SOURCE
]
=
link
[
LINK_SOURCE
];
cleanLink
[
LINK_TARGET
]
=
link
[
LINK_TARGET
];
}
// Other parameters
LINK_PARAMS
.
forEach
((
param
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment