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
0db15dca
Commit
0db15dca
authored
2 years ago
by
Matthias Konitzny
Browse files
Options
Downloads
Patches
Plain Diff
Fixed graph data loading to match new system
parent
ff909d7f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/display/display.tsx
+7
-5
7 additions, 5 deletions
src/display/display.tsx
with
7 additions
and
5 deletions
src/display/display.tsx
+
7
−
5
View file @
0db15dca
...
@@ -3,14 +3,15 @@ import screenfull from "screenfull";
...
@@ -3,14 +3,15 @@ import screenfull from "screenfull";
import
PropTypes
,
{
InferType
}
from
"
prop-types
"
;
import
PropTypes
,
{
InferType
}
from
"
prop-types
"
;
import
"
./display.css
"
;
import
"
./display.css
"
;
import
{
GraphNode
,
GraphRenderer
}
from
"
./renderer
"
;
import
{
Visual
GraphNode
,
GraphRenderer
}
from
"
./renderer
"
;
import
*
as
Helpers
from
"
./helpers
"
;
import
*
as
Helpers
from
"
./helpers
"
;
import
{
Graph
,
Node
}
from
"
../common/graph/graph
"
;
import
{
Graph
}
from
"
../common/graph/graph
"
;
import
{
loadGraphJson
}
from
"
../common/datasets
"
;
import
{
loadGraphJson
}
from
"
../common/datasets
"
;
import
NodeInfoBar
from
"
./components/nodeinfo/nodeinfobar
"
;
import
NodeInfoBar
from
"
./components/nodeinfo/nodeinfobar
"
;
import
FilterMenu
from
"
./components/nodefilter/filtermenu
"
;
import
FilterMenu
from
"
./components/nodefilter/filtermenu
"
;
import
SearchBar
from
"
./components/searchbar
"
;
import
SearchBar
from
"
./components/searchbar
"
;
import
expandicon
from
"
./expand_icon.svg
"
;
import
expandicon
from
"
./expand_icon.svg
"
;
import
{
Node
}
from
"
../common/graph/node
"
;
/**
/**
* This component manages and renders a 3d-force-graph with additional menus to navigate, filter and view information on nodes.
* This component manages and renders a 3d-force-graph with additional menus to navigate, filter and view information on nodes.
...
@@ -63,7 +64,8 @@ class Display extends React.Component<
...
@@ -63,7 +64,8 @@ class Display extends React.Component<
const
fetchGraph
=
async
()
=>
{
const
fetchGraph
=
async
()
=>
{
const
graphData
=
await
loadGraphJson
(
this
.
props
.
spaceId
);
const
graphData
=
await
loadGraphJson
(
this
.
props
.
spaceId
);
this
.
graph
=
Graph
.
fromSerializedObject
(
graphData
);
this
.
graph
=
new
Graph
();
this
.
graph
.
fromSerializedObject
(
graphData
);
// console.log(this.graph);
// console.log(this.graph);
this
.
setState
({
graph
:
this
.
graph
});
this
.
setState
({
graph
:
this
.
graph
});
};
};
...
@@ -75,8 +77,8 @@ class Display extends React.Component<
...
@@ -75,8 +77,8 @@ class Display extends React.Component<
}
}
handleNodeChangeRequest
(
node
:
Node
)
{
handleNodeChangeRequest
(
node
:
Node
)
{
this
.
rendererRef
.
current
.
focusOnNode
(
node
as
GraphNode
);
this
.
rendererRef
.
current
.
focusOnNode
(
node
as
Visual
GraphNode
);
this
.
rendererRef
.
current
.
displayNodeSelection
(
node
as
GraphNode
);
this
.
rendererRef
.
current
.
displayNodeSelection
(
node
as
Visual
GraphNode
);
this
.
handleNodeClicked
(
node
);
this
.
handleNodeClicked
(
node
);
}
}
...
...
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