数据模型初步接入接口
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user