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
8e5b0f4d
Commit
8e5b0f4d
authored
2 years ago
by
Maximilian Giller
Browse files
Options
Downloads
Patches
Plain Diff
Removed unused code
parent
9fb847aa
No related branches found
No related tags found
No related merge requests found
Pipeline
#56928
passed
2 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/editor/js/state.ts
+0
-89
0 additions, 89 deletions
src/editor/js/state.ts
src/editor/js/structures/space.ts
+0
-15
0 additions, 15 deletions
src/editor/js/structures/space.ts
with
0 additions
and
104 deletions
src/editor/js/state.ts
deleted
100644 → 0
+
0
−
89
View file @
9fb847aa
// export const TOOLS = {
// undo: new UndoTool("undo"),
// redo: new RedoTool("redo"),
// select: new SelectTool("select"),
// delete: new DeleteTool("delete"),
// addnode: new AddNodeTool("addnode"),
// connect: new ConnectTool("connect"),
// settings: new SettingsTool("settings"),
// save: new SaveTool("save"),
// };
// export class State extends Tool {
// onNodeDragEnd(node: any, translate: any) {
// // Handle as click event, if drag distance under a certain threshold
// const distanceDragged = Math.sqrt(
// Math.pow(translate.x, 2) + Math.pow(translate.y, 2)
// );
// if (distanceDragged < DRAG_THRESHOLD_2D) {
// this.onNodeClick(node);
// return;
// } else {
// this.tool.onNodeDragEnd(node, translate);
// }
// }
// onKeyDown(key: any) {
// const previous = this.keyStates[id];
// if (previous !== true) {
// this.tool.onKeyDown(key);
// }
// }
// onKeyUp(key: any) {
// const previous = this.keyStates[id];
// if (previous !== false) {
// this.tool.onKeyUp(key);
// }
// }
// nodePointerAreaPaint(node: any, color: any, ctx: any) {
// const toolValue = this.tool.nodePointerAreaPaint(node, color, ctx);
// if (toolValue !== undefined) {
// return toolValue;
// }
// const imageSize = 12;
// ctx.fillStyle = color;
// ctx.fillRect(
// node.x - imageSize / 2,
// node.y - imageSize / 2,
// imageSize,
// imageSize
// ); // draw square as pointer trap
// }
// linkWidth(link: any) {
// const toolValue = this.tool.linkWidth(link);
// if (toolValue !== undefined) {
// return toolValue;
// }
// return this.isLinkHighlighted(link) ? 2 : 1;
// }
// linkDirectionalParticles() {
// const toolValue = this.tool.linkDirectionalParticles();
// if (toolValue !== undefined) {
// return toolValue;
// }
// return 4;
// }
// linkDirectionalParticleWidth(link: any) {
// const toolValue = this.tool.linkDirectionalParticleWidth(link);
// if (toolValue !== undefined) {
// return toolValue;
// }
// return this.isLinkHighlighted(link) ? 4 : 0;
// }
// onBackgroundClick(event: any, positions: any) {
// this.tool.onBackgroundClick(event, positions);
// }
// }
This diff is collapsed.
Click to expand it.
src/editor/js/structures/space.ts
deleted
100644 → 0
+
0
−
15
View file @
9fb847aa
import
{
GLOBAL_PARAMS
,
SerializableItem
}
from
"
./helper/serializableitem
"
;
import
{
Graph
}
from
"
./graph/graph
"
;
const
SPACE_PARAMS
=
[
"
name
"
,
"
description
"
,
"
graph
"
,
...
GLOBAL_PARAMS
];
export
class
Space
extends
SerializableItem
{
public
name
:
string
;
public
description
:
string
;
public
graph
:
Graph
;
serialize
():
any
{
return
this
.
serializeProperties
(
SPACE_PARAMS
);
}
}
\ No newline at end of file
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