Merge pull request #1388 from mermaid-js/1386_finetuning_rendering_engine

1386 finetuning rendering engine
This commit is contained in:
Knut Sveidqvist
2020-05-13 17:36:12 +02:00
committed by GitHub
10 changed files with 226 additions and 99 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) {