Skip to content
Snippets Groups Projects
Commit d181c483 authored by Matthias Konitzny's avatar Matthias Konitzny :fire:
Browse files

Settings now actually work

parent 9bc676b5
Branches merge-graph-data-structures
Tags
No related merge requests found
Pipeline #56982 passed
......@@ -64,7 +64,7 @@ export class GraphRenderer2D extends React.PureComponent<
});
this.state = {
selectedNodes: [], // TODO: Why was undefined allowed here?
selectedNodes: [],
};
this.keys = {};
......@@ -182,12 +182,8 @@ export class GraphRenderer2D extends React.PureComponent<
}
private handleNodeDrag(node: Node) {
// if (!this.props.selectedNodes.includes(node)) {
// this.props.onNodeSelectionChanged([...this.props.selectedNodes, node]);
// }
// Should run connect logic?
if (!this.props.connectOnDrag) {
if (!this.props.settings.connectOnDrag) {
return;
}
......@@ -204,7 +200,7 @@ export class GraphRenderer2D extends React.PureComponent<
}
// Add link
this.props.onLinkCreation(node.id, closest.id);
this.props.onLinkCreation(node.id, closest.node.id);
}
private handleNodeCanvasObject(
......@@ -234,7 +230,7 @@ export class GraphRenderer2D extends React.PureComponent<
n.neighbors.includes(node)
);
if (this.props.settings && drawLabel) {
if (this.props.settings.visibleLabels && drawLabel) {
const labelHeightOffset = iconSize / 3;
this.drawNodeLabel(node, globalScale, ctx, labelHeightOffset, 11);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment