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

Notion of SerializedUrl removed, now just using strings

parent 15505085
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56733 passed
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);
......
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
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