Skip to content

Commit 6396abc

Browse files
remove node5
1 parent 16f6b48 commit 6396abc

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

demos/demo-right-angles-routing/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ export default () => {
4646
const node4 = new DefaultNodeModel("Node D", "rgb(192,0,255)");
4747
const port4 = node4.addPort(new LabViewPortModel(true, "in-1", "In"));
4848
node4.setPosition(95, 185);
49-
const node5 = new DefaultNodeModel("Node E", "rgb(192,255,0)");
50-
node5.setPosition(250, 180);
5149

5250
// linking things together
5351
const link1 = port1.link(port4);
5452
const link2 = port2.link(port3);
5553

5654
// add all to the main model
57-
model.addAll(node1, node2, node3, node4, node5, link1, link2);
55+
model.addAll(node1, node2, node3, node4, link1, link2);
5856

5957
// load model into engine and render
6058
engine.setDiagramModel(model);

src/routing/rightAngle/widgets/RightAngleLinkWidget.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as _ from "lodash";
99
import { LabelModel } from "../../../models/LabelModel";
1010
import { BaseWidget, BaseWidgetProps } from "../../../widgets/BaseWidget";
1111

12-
export interface LabViewLinkProps extends BaseWidgetProps {
12+
export interface RightAngleLinkProps extends BaseWidgetProps {
1313
color?: string;
1414
width?: number;
1515
smooth?: boolean;
@@ -18,13 +18,13 @@ export interface LabViewLinkProps extends BaseWidgetProps {
1818
pointAdded?: (point: PointModel, event: MouseEvent) => any;
1919
}
2020

21-
export interface LabViewLinkState {
21+
export interface RightAngleLinkState {
2222
selected: boolean,
2323
canDrag: boolean,
2424
}
2525

26-
export class RightAngleLinkWidget extends BaseWidget<LabViewLinkProps, LabViewLinkState> {
27-
public static defaultProps: LabViewLinkProps = {
26+
export class RightAngleLinkWidget extends BaseWidget<RightAngleLinkProps, RightAngleLinkState> {
27+
public static defaultProps: RightAngleLinkProps = {
2828
color: "red",
2929
width: 3,
3030
link: null,
@@ -40,7 +40,7 @@ export class RightAngleLinkWidget extends BaseWidget<LabViewLinkProps, LabViewLi
4040

4141
pathFinding: PathFinding; // only set when smart routing is active
4242

43-
constructor(props: LabViewLinkProps) {
43+
constructor(props: RightAngleLinkProps) {
4444
super("srd-default-link", props);
4545

4646
this.refLabels = {};

0 commit comments

Comments
 (0)