Revert "delay all label rendering"

This reverts commit 72c7c62f99c22a59d20d028c0abe1b358fda590c.
This commit is contained in:
Martin Stamm 2022-03-18 16:49:18 +01:00
parent ff387e5aad
commit 51fb2716cd

View File

@ -449,9 +449,8 @@ export default function BpmnRenderer(
return null;
}
async function renderLabel(parentGfx, label, options) {
function renderLabel(parentGfx, label, options) {
return scheduler.schedule(() => {
options = assign({
size: {
width: 100
@ -465,13 +464,12 @@ export default function BpmnRenderer(
svgAppend(parentGfx, text);
return text;
});
}
async function renderEmbeddedLabel(parentGfx, element, align) {
function renderEmbeddedLabel(parentGfx, element, align) {
var semantic = getSemantic(element);
return await renderLabel(parentGfx, semantic.name, {
return renderLabel(parentGfx, semantic.name, {
box: element,
align: align,
padding: 5,
@ -481,7 +479,7 @@ export default function BpmnRenderer(
});
}
async function renderExternalLabel(parentGfx, element) {
function renderExternalLabel(parentGfx, element) {
var box = {
width: 90,
@ -490,7 +488,7 @@ export default function BpmnRenderer(
y: element.height / 2 + element.y
};
return await renderLabel(parentGfx, getLabel(element), {
return renderLabel(parentGfx, getLabel(element), {
box: box,
fitBox: true,
style: assign(
@ -503,8 +501,8 @@ export default function BpmnRenderer(
});
}
async function renderLaneLabel(parentGfx, text, element) {
var textBox = await renderLabel(parentGfx, text, {
function renderLaneLabel(parentGfx, text, element) {
var textBox = renderLabel(parentGfx, text, {
box: {
height: 30,
width: element.height
@ -1620,8 +1618,8 @@ export default function BpmnRenderer(
return group;
},
'label': async function(parentGfx, element) {
return await renderExternalLabel(parentGfx, element);
'label': function(parentGfx, element) {
return renderExternalLabel(parentGfx, element);
},
'bpmn:TextAnnotation': function(parentGfx, element) {
var style = {