Remove coords from relationship objects

This commit is contained in:
1ilit
2024-04-05 03:02:29 +03:00
parent fa8fdae863
commit 10e0e279cc
19 changed files with 206 additions and 604 deletions

View File

@@ -49,6 +49,9 @@ export const noteThemes = [
export const defaultBlue = "#175e7a";
export const defaultNoteTheme = "#fcf7ac";
export const tableHeaderHeight = 50;
export const tableWidth = 200;
export const tableFieldHeight = 36;
export const Cardinality = {
ONE_TO_ONE: "One to one",

View File

@@ -103,10 +103,6 @@ export const diagram = {
startFieldId: 1,
endTableId: 0,
endFieldId: 0,
startX: xOffset + 42,
startY: window.innerHeight * 0.72 - (4 * 36 + 50 + 7) * 0.5 + (50 + 18 * 2),
endX: xOffset + 90,
endY: window.innerHeight * 0.23 - (4 * 36 + 50 + 7) * 0.5 + (50 + 18 * 1),
cardinality: "Many to one",
},
{
@@ -114,10 +110,6 @@ export const diagram = {
startFieldId: 2,
endTableId: 1,
endFieldId: 0,
startX: xOffset + 351,
startY: window.innerHeight * 0.72 - (3 * 36 + 50 + 7) * 0.5 + (50 + 18 * 5),
endX: xOffset + 42,
endY: window.innerHeight * 0.72 - (5 * 36 + 50 + 7) * 0.5 + (50 + 18 * 1),
cardinality: "One to one",
},
{
@@ -125,11 +117,7 @@ export const diagram = {
startFieldId: 1,
endTableId: 3,
endFieldId: 0,
startX: xOffset + 351,
startY: window.innerHeight * 0.72 - (3 * 36 + 50 + 7) * 0.5 + (50 + 18 * 3),
endX: xOffset + 325,
endY: window.innerHeight * 0.23 - (3 * 36 + 50 + 7) * 0.5 + (50 + 18 * 1),
cardinality: "Many to one",
},
],
};
};

View File

@@ -124,15 +124,10 @@ export const jsonSchema = {
startFieldId: { type: "integer" },
endTableId: { type: "integer" },
endFieldId: { type: "integer" },
startX: { type: "number" },
startY: { type: "number" },
endX: { type: "number" },
endY: { type: "number" },
name: { type: "string" },
cardinality: { type: "string" },
updateConstraint: { type: "string" },
deleteConstraint: { type: "string" },
mandatory: { type: "boolean" },
id: { type: "integer" },
},
required: [
@@ -140,15 +135,10 @@ export const jsonSchema = {
"startFieldId",
"endTableId",
"endFieldId",
"startX",
"startY",
"endX",
"endY",
"name",
"cardinality",
"updateConstraint",
"deleteConstraint",
"mandatory",
"id",
],
},