diff --git a/lib/features/modeling/behavior/LabelBehavior.js b/lib/features/modeling/behavior/LabelBehavior.js index 436a4108..c51196e6 100644 --- a/lib/features/modeling/behavior/LabelBehavior.js +++ b/lib/features/modeling/behavior/LabelBehavior.js @@ -26,6 +26,7 @@ var DEFAULT_LABEL_DIMENSIONS = { }; var NAME_PROPERTY = 'name'; +var TEXT_PROPERTY = 'text'; /** * A component that makes sure that external labels are added @@ -53,7 +54,7 @@ export default function LabelBehavior( modeling.updateLabel(element, properties[NAME_PROPERTY]); } - if ('text' in properties + if (TEXT_PROPERTY in properties && is(element, 'bpmn:TextAnnotation')) { var newBounds = textRenderer.getTextAnnotationBounds( @@ -63,7 +64,7 @@ export default function LabelBehavior( width: element.width, height: element.height }, - properties.text || '' + properties[TEXT_PROPERTY] || '' ); modeling.updateLabel(element, properties.text, newBounds);