diff --git a/lib/draw/BpmnRenderer.js b/lib/draw/BpmnRenderer.js index 9b4725f3..c571448e 100644 --- a/lib/draw/BpmnRenderer.js +++ b/lib/draw/BpmnRenderer.js @@ -275,12 +275,21 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) { } function renderLaneLabel(p, text, data) { - // position text left top - var textBox = renderLabel(p, text, {height: data.width, width: data.height}, 'left-top'); - // rotate text and center it on the middle of the lane height + var textBox = renderLabel( + p, + text, + { + height: 30, + width: data.height + }, + 'center-middle' + ); var bbox = textBox.getBBox(); - var top = (data.height / 2) + (bbox.width / 2); - textBox.transform('translate(0,' + top + ') rotate(270)'); + var top = -1 * data.height; + textBox.transform( + 'rotate(270) ' + + 'translate(' + top + ',' + 0 + ')' + ); } var handlers = {