feat(label-editing): enable direct editing for group labels

* Adds external label for Groups
* Modifies referenced categoryValue

Closes #955
This commit is contained in:
Niklas Kiefer
2019-05-22 08:45:12 +02:00
committed by merge-me[bot]
parent f6f9ac29f2
commit fb3398fa39
10 changed files with 89 additions and 15 deletions

View File

@ -27,7 +27,8 @@ export function isLabelExternal(semantic) {
is(semantic, 'bpmn:DataInput') ||
is(semantic, 'bpmn:DataOutput') ||
is(semantic, 'bpmn:SequenceFlow') ||
is(semantic, 'bpmn:MessageFlow');
is(semantic, 'bpmn:MessageFlow') ||
is(semantic, 'bpmn:Group');
}
/**
@ -97,6 +98,11 @@ export function getExternalLabelMid(element) {
if (element.waypoints) {
return getFlowLabelPosition(element.waypoints);
} else if (is(element, 'bpmn:Group')) {
return {
x: element.x + element.width / 2,
y: element.y + DEFAULT_LABEL_SIZE.height / 2
};
} else {
return {
x: element.x + element.width / 2,