Updated demos.

This commit is contained in:
Henning Dieterichs
2020-02-19 15:14:11 +01:00
parent 5bc4347f3c
commit 27b9bc1905
27 changed files with 793 additions and 82 deletions

View File

@@ -44,15 +44,15 @@ export class VisJsGraphViewer extends React.Component<{
private readonly divRef = React.createRef<HTMLDivElement>();
private readonly nodes = new DataSet<{
id: string;
label: string;
label?: string;
color?: string;
shape?: string;
}>();
private readonly edges = new DataSet<{
id: string;
label: string;
from: string;
to: string;
label?: string;
color?: string;
dashes?: boolean;
shape?: boolean;
@@ -68,7 +68,7 @@ export class VisJsGraphViewer extends React.Component<{
newNodes.add(n.id);
this.nodes.update({
id: n.id,
label: n.label,
label: n.label !== undefined ? n.label : n.id,
color: n.color,
shape: n.shape,
});
@@ -92,7 +92,7 @@ export class VisJsGraphViewer extends React.Component<{
newEdges.add(id);
this.edges.update({
id: id,
label: n.label,
label: n.label !== undefined ? n.label : "",
from: n.from,
to: n.to,
color: n.color,