Skip to content
Snippets Groups Projects
Commit 8e5b0f4d authored by Maximilian Giller's avatar Maximilian Giller :squid:
Browse files

Removed unused code

parent 9fb847aa
No related branches found
No related tags found
No related merge requests found
Pipeline #56928 passed
// 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);
// }
// }
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment