Fix interface labels positions

This commit is contained in:
ziajka 2018-12-13 13:04:52 +01:00
parent b733d94fbe
commit 3e9eb81dfd

View File

@ -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})`;
})