From fe44af7d296f2100ff9af3c55bc1ff7ad2f59f33 Mon Sep 17 00:00:00 2001 From: Maximilian Giller <m.giller@tu-bs.de> Date: Thu, 7 Jul 2022 22:10:30 +0200 Subject: [PATCH] Notion of SerializedUrl removed, now just using strings --- src/editor/js/structures/graph/node.ts | 9 ++++----- src/editor/js/structures/helper/serializedurl.ts | 13 ------------- 2 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 src/editor/js/structures/helper/serializedurl.ts diff --git a/src/editor/js/structures/graph/node.ts b/src/editor/js/structures/graph/node.ts index 426feec..773c0e0 100644 --- a/src/editor/js/structures/graph/node.ts +++ b/src/editor/js/structures/graph/node.ts @@ -1,7 +1,6 @@ import { Graph } from "./graph"; import { GraphElement } from "./graphelement"; import { NodeType } from "./nodetype"; -import { SerializedURL } from "../helper/serializedurl"; import { Link } from "./link"; import { GLOBAL_PARAMS } from "../helper/serializableitem"; @@ -21,10 +20,10 @@ export class Node extends GraphElement { public label: string; public description: string; public type: NodeType; - public icon: SerializedURL; - public banner: SerializedURL; - public video: SerializedURL; - public references: SerializedURL[]; + public icon: string; + public banner: string; + public video: string; + public references: string[]; constructor(graph: Graph = undefined) { super(graph); diff --git a/src/editor/js/structures/helper/serializedurl.ts b/src/editor/js/structures/helper/serializedurl.ts deleted file mode 100644 index 7a56676..0000000 --- a/src/editor/js/structures/helper/serializedurl.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {GLOBAL_PARAMS, SerializableItem} from "./serializableitem"; - -const URL_PARAMS = ["link", ...GLOBAL_PARAMS]; - -export class SerializedURL extends SerializableItem { - public link: string; // The full url - - // TODO: URL validator - - serialize(): any { - return this.serializeProperties(URL_PARAMS); - } -} \ No newline at end of file -- GitLab