#1386 Adding support for click events and links

This commit is contained in:
Knut Sveidqvist
2020-05-06 18:51:12 +02:00
parent a20e6086cc
commit 9a3ec31191
7 changed files with 87 additions and 75 deletions

View File

@@ -34,8 +34,10 @@ export const insertEdgeLabel = (elem, edge) => {
export const positionEdgeLabel = edge => {
logger.info('Moving label', edge.id, edge.label, edgeLabels[edge.id]);
const el = edgeLabels[edge.id];
el.attr('transform', 'translate(' + edge.x + ', ' + edge.y + ')');
if (edge.label) {
const el = edgeLabels[edge.id];
el.attr('transform', 'translate(' + edge.x + ', ' + edge.y + ')');
}
};
// const getRelationType = function(type) {