From 3e9eb81dfdb81c0124d29001a5198527f4202eca Mon Sep 17 00:00:00 2001 From: ziajka Date: Thu, 13 Dec 2018 13:04:52 +0100 Subject: [PATCH] Fix interface labels positions --- src/app/cartography/widgets/interface-label.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/app/cartography/widgets/interface-label.ts b/src/app/cartography/widgets/interface-label.ts index 527aaaae..19a3c185 100644 --- a/src/app/cartography/widgets/interface-label.ts +++ b/src/app/cartography/widgets/interface-label.ts @@ -86,13 +86,8 @@ export class InterfaceLabelWidget { styles = this.fontFixer.fixStyles(styles); return styles; }) - .attr('x', function (this: SVGTextElement, l: MapLinkNode) { - return l.label.x; - }) - .attr('y', function (this: SVGTextElement, l: MapLinkNode) { - let bbox = this.getBBox(); - return l.label.y + bbox.height; - }) + .attr('x', (l: MapLinkNode) => l.label.x) + .attr('y', (l: MapLinkNode) => l.label.y) .attr('transform', (l: MapLinkNode) => { return `rotate(${l.label.rotation}, ${l.label.x}, ${l.label.y})`; })