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
881df3cf
Commit
881df3cf
authored
2 years ago
by
Maximilian Giller
Browse files
Options
Downloads
Patches
Plain Diff
Removed bad static objects
parent
2ed1decd
No related branches found
No related tags found
1 merge request
!2
Implemented editor in the react framework
Pipeline
#56648
passed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/editor/js/components/editor.tsx
+0
-18
0 additions, 18 deletions
src/editor/js/components/editor.tsx
with
0 additions
and
18 deletions
src/editor/js/components/editor.tsx
+
0
−
18
View file @
881df3cf
...
...
@@ -18,11 +18,6 @@ type stateTypes = {
};
export
class
Editor
extends
React
.
PureComponent
<
propTypes
,
stateTypes
>
{
// TODO: Not a long term solution!
public
static
globalState
:
State
;
public
static
globalGraph
:
Graph
;
public
static
globalRenderer
:
any
;
constructor
(
props
:
propTypes
)
{
super
(
props
);
this
.
loadGraph
=
this
.
loadGraph
.
bind
(
this
);
...
...
@@ -64,8 +59,6 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
// Create global objects
const
newState
=
new
State
();
const
newGraph
=
Graph
.
parse
(
data
);
Editor
.
globalState
=
newState
;
Editor
.
globalGraph
=
newGraph
;
// Is valid and parsed successfully?
// TODO: Check doesn't work for some reason, always returns true, even tho it should be considered defined
...
...
@@ -75,12 +68,6 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
// return false;
// }
// Create renderer
// console.log("Creating renderer ...");
// const renderTarget = document.getElementById("2d-graph");
// const renderWidth = renderTarget.offsetWidth;
// Editor.globalRenderer = ForceGraph()(renderTarget);
// // Subscribe to interactions
// console.log("Subscribing to events ...");
// Editor.globalRenderer
...
...
@@ -122,11 +109,6 @@ export class Editor extends React.PureComponent<propTypes, stateTypes> {
// )
// .onLinkClick((link: any) => Editor.globalState.onLinkClick(link));
// // Connect update event
// Editor.globalGraph.onChangeCallbacks.push((data) => {
// Editor.globalRenderer.graphData(data);
// });
// Set as new state
console
.
log
(
newGraph
);
this
.
setState
({
...
...
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