mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-27 09:15:01 +00:00
Revert "delay all label rendering"
This reverts commit 72c7c62f99c22a59d20d028c0abe1b358fda590c.
This commit is contained in:
parent
ff387e5aad
commit
51fb2716cd
@ -449,29 +449,27 @@ 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
|
||||
}
|
||||
}, options);
|
||||
options = assign({
|
||||
size: {
|
||||
width: 100
|
||||
}
|
||||
}, options);
|
||||
|
||||
var text = textRenderer.createText(label || '', options);
|
||||
var text = textRenderer.createText(label || '', options);
|
||||
|
||||
svgClasses(text).add('djs-label');
|
||||
svgClasses(text).add('djs-label');
|
||||
|
||||
svgAppend(parentGfx, text);
|
||||
svgAppend(parentGfx, text);
|
||||
|
||||
return 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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user