Skip to content

Commit 3f64c66

Browse files
committed
custom Edge's properties
1 parent c7bbe7d commit 3f64c66

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/Layout/EditorDetailPanel/DetailForm.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class DetailForm extends React.Component {
8383

8484
renderEdgeDetail = () => {
8585
const { form } = this.props;
86-
const { label = "", shape = "flow-smooth" } = this.item.getModel();
86+
const { label = "", shape = "flow-smooth", strength = 1 } = this.item.getModel();
8787

8888
return (
8989
<>
@@ -97,6 +97,11 @@ class DetailForm extends React.Component {
9797
initialValue: shape
9898
})(this.renderEdgeShapeSelect())}
9999
</Item>
100+
<Item label="Strength" {...inlineFormItemLayout}>
101+
{form.getFieldDecorator("strength", {
102+
initialValue: strength
103+
})(<Input type="number" onBlur={this.handleSubmit} />)}
104+
</Item>
100105
</>
101106
);
102107
};

0 commit comments

Comments
 (0)