mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-08-14 01:57:37 +08:00
feat(label-editing): enable direct editing for group labels
* Adds external label for Groups * Modifies referenced categoryValue Closes #955
This commit is contained in:

committed by
merge-me[bot]
![merge-me[bot]](/assets/img/avatar_default.png)
parent
f6f9ac29f2
commit
fb3398fa39
@ -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,
|
||||
|
Reference in New Issue
Block a user