#1295 Drawing edges between nodes

This commit is contained in:
Knut Sveidqvist
2020-03-11 17:36:30 +01:00
parent aa32d454c9
commit 1b64af143e
9 changed files with 54 additions and 88 deletions

View File

@@ -34,18 +34,18 @@ export const positionEdgeLabel = edge => {
el.attr('transform', 'translate(' + edge.x + ', ' + edge.y + ')');
};
const getRelationType = function(type) {
switch (type) {
case stateDb.relationType.AGGREGATION:
return 'aggregation';
case stateDb.relationType.EXTENSION:
return 'extension';
case stateDb.relationType.COMPOSITION:
return 'composition';
case stateDb.relationType.DEPENDENCY:
return 'dependency';
}
};
// const getRelationType = function(type) {
// switch (type) {
// case stateDb.relationType.AGGREGATION:
// return 'aggregation';
// case stateDb.relationType.EXTENSION:
// return 'extension';
// case stateDb.relationType.COMPOSITION:
// return 'composition';
// case stateDb.relationType.DEPENDENCY:
// return 'dependency';
// }
// };
export const insertEdge = function(elem, edge) {
// The data for our line