数据模型初步接入接口

This commit is contained in:
aixianling
2023-03-31 18:49:51 +08:00
parent 8b3f831bbd
commit fdbe0c4c37
4 changed files with 33 additions and 45 deletions

View File

@@ -51,19 +51,17 @@ class DataModel extends HtmlNodeModel {
y,
width,
height,
properties: {props, isConnection}
properties: {props}
} = this;
const anchors = [];
props?.forEach((field, index) => {
if (isConnection) {
anchors.push({
x: x - width / 2 + 6,
y: y - height / 2 + 58 + index * 20,
id: `${id}_${field.columnName}`,
edgeAddable: false,
type: "left"
});
}
anchors.push({
x: x - width / 2 + 6,
y: y - height / 2 + 58 + index * 20,
id: `${id}@${field.columnName}`,
edgeAddable: false,
type: "left"
});
});
return anchors;
}
@@ -92,7 +90,7 @@ class MainModel extends DataModel {
anchors.push({
x: x + width / 2 - 6,
y: y - height / 2 + 58 + index * 20,
id: `${id}_${index}_right`,
id: `${id}@${field.columnName}`,
type: "right",
field
});