Skip to content

Commit ce0fe8e

Browse files
Release v0.0.99
1 parent 76cfbcd commit ce0fe8e

File tree

6 files changed

+10
-44
lines changed

6 files changed

+10
-44
lines changed

dist/index.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -44522,15 +44522,10 @@ var SchemaDesigner = class {
4452244522
}
4452344523
const oldTable = state.cell.value;
4452444524
const incomingEdges = this.mxModel.getIncomingEdges(state.cell);
44525-
const outgoingEdges = this.mxModel.getOutgoingEdges(state.cell);
4452644525
const incomingEdgesIds = incomingEdges.map((edge) => {
4452744526
const edgeValue = edge.value;
4452844527
return oldTable.columns[edgeValue.targetRow - 1].id;
4452944528
});
44530-
const outgoingEdgesIds = outgoingEdges.map((edge) => {
44531-
const edgeValue = edge.value;
44532-
return oldTable.columns[edgeValue.sourceRow - 1].id;
44533-
});
4453444529
this.mxGraph.labelChanged(state.cell, {
4453544530
id: editedTable.id,
4453644531
name: editedTable.name,
@@ -44555,14 +44550,8 @@ var SchemaDesigner = class {
4455544550
this.renderForeignKey(edgeValue, edge.source.value);
4455644551
}
4455744552
});
44558-
outgoingEdges.forEach((edge, index) => {
44559-
const outgoingEdgeId = outgoingEdgesIds[index];
44560-
const edgeValue = edge.value;
44561-
const column = editedTable.columns.find((column2) => column2.id === outgoingEdgeId);
44562-
if (column !== void 0) {
44563-
edgeValue.columns = [column.name];
44564-
this.renderForeignKey(edgeValue, editedTable);
44565-
}
44553+
editedTable.foreignKeys.forEach((foreignKey) => {
44554+
this.renderForeignKey(foreignKey, editedTable);
4456644555
});
4456744556
this.autoLayout();
4456844557
this.mxGraph.model.endUpdate();

dist/index.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/ts/schemaDesigner/schemaDesigner.js

+2-13
Original file line numberDiff line numberDiff line change
@@ -711,15 +711,10 @@ class SchemaDesigner {
711711
}
712712
const oldTable = state.cell.value;
713713
const incomingEdges = this.mxModel.getIncomingEdges(state.cell);
714-
const outgoingEdges = this.mxModel.getOutgoingEdges(state.cell);
715714
const incomingEdgesIds = incomingEdges.map((edge) => {
716715
const edgeValue = edge.value;
717716
return oldTable.columns[edgeValue.targetRow - 1].id;
718717
});
719-
const outgoingEdgesIds = outgoingEdges.map((edge) => {
720-
const edgeValue = edge.value;
721-
return oldTable.columns[edgeValue.sourceRow - 1].id;
722-
});
723718
this.mxGraph.labelChanged(state.cell, {
724719
id: editedTable.id,
725720
name: editedTable.name,
@@ -745,14 +740,8 @@ class SchemaDesigner {
745740
this.renderForeignKey(edgeValue, edge.source.value);
746741
}
747742
});
748-
outgoingEdges.forEach((edge, index) => {
749-
const outgoingEdgeId = outgoingEdgesIds[index];
750-
const edgeValue = edge.value;
751-
const column = editedTable.columns.find((column) => column.id === outgoingEdgeId);
752-
if (column !== undefined) {
753-
edgeValue.columns = [column.name];
754-
this.renderForeignKey(edgeValue, editedTable);
755-
}
743+
editedTable.foreignKeys.forEach((foreignKey) => {
744+
this.renderForeignKey(foreignKey, editedTable);
756745
});
757746
// Update the cell position
758747
this.autoLayout();

dist/tsconfig.tsbuildinfo

+1-1
Large diffs are not rendered by default.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "azdataGraph",
33
"description": "azdataGraph is a derivative of mxGraph, which is a fully client side JavaScript diagramming library that uses SVG and HTML for rendering.",
4-
"version": "0.0.98",
4+
"version": "0.0.99",
55
"homepage": "https://github.com/microsoft/azdataGraph",
66
"author": "Microsoft",
77
"license": "Apache-2.0",

src/ts/schemaDesigner/schemaDesigner.ts

+2-14
Original file line numberDiff line numberDiff line change
@@ -865,18 +865,12 @@ export class SchemaDesigner {
865865
const oldTable = state.cell.value as SchemaDesignerTable;
866866

867867
const incomingEdges = this.mxModel.getIncomingEdges(state.cell);
868-
const outgoingEdges = this.mxModel.getOutgoingEdges(state.cell);
869868

870869
const incomingEdgesIds = incomingEdges.map((edge) => {
871870
const edgeValue = edge.value as EdgeCellValue;
872871
return oldTable.columns[edgeValue.targetRow - 1].id;
873872
});
874873

875-
const outgoingEdgesIds = outgoingEdges.map((edge) => {
876-
const edgeValue = edge.value as EdgeCellValue;
877-
return oldTable.columns[edgeValue.sourceRow - 1].id;
878-
});
879-
880874
this.mxGraph.labelChanged(state.cell, {
881875
id: editedTable.id,
882876
name: editedTable.name,
@@ -907,14 +901,8 @@ export class SchemaDesigner {
907901
}
908902
});
909903

910-
outgoingEdges.forEach((edge, index) => {
911-
const outgoingEdgeId = outgoingEdgesIds[index];
912-
const edgeValue = edge.value as EdgeCellValue;
913-
const column = editedTable.columns.find((column) => column.id === outgoingEdgeId);
914-
if (column !== undefined) {
915-
edgeValue.columns = [column.name];
916-
this.renderForeignKey(edgeValue, editedTable);
917-
}
904+
editedTable.foreignKeys.forEach((foreignKey) => {
905+
this.renderForeignKey(foreignKey, editedTable);
918906
});
919907

920908
// Update the cell position

0 commit comments

Comments
 (0)