chore(draw): remove internal label for groups

This commit is contained in:
Niklas Kiefer 2019-05-22 08:40:35 +02:00 committed by merge-me[bot]
parent 57f516ef32
commit f6f9ac29f2
2 changed files with 6 additions and 34 deletions

View File

@ -13,6 +13,10 @@ import {
isEventSubProcess
} from '../util/DiUtil';
import {
getLabel
} from '../features/label-editing/LabelUtil';
import { is } from '../util/ModelUtil';
import {
@ -472,7 +476,7 @@ export default function BpmnRenderer(
}
function renderExternalLabel(parentGfx, element) {
var semantic = getSemantic(element);
var box = {
width: 90,
height: 30,
@ -480,7 +484,7 @@ export default function BpmnRenderer(
y: element.height / 2 + element.y
};
return renderLabel(parentGfx, semantic.name, {
return renderLabel(parentGfx, getLabel(element), {
box: box,
fitBox: true,
style: assign(
@ -1580,8 +1584,6 @@ export default function BpmnRenderer(
return outer;
},
'bpmn:Group': function(parentGfx, element) {
var semantic = getSemantic(element),
di = getDi(element);
var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, {
strokeWidth: 1,
@ -1590,19 +1592,6 @@ export default function BpmnRenderer(
pointerEvents: 'none'
});
var categoryValueRef = semantic.categoryValueRef || {};
if (categoryValueRef.value) {
var box = di.label ? di.label.bounds : element;
renderLabel(parentGfx, categoryValueRef.value, {
box: box,
style: {
fill: getStrokeColor(element, defaultStrokeColor)
}
});
}
return group;
},
'label': function(parentGfx, element) {

View File

@ -123,23 +123,6 @@ describe('draw - bpmn renderer', function() {
});
it('should render group name', function(done) {
var xml = require('../../fixtures/bpmn/draw/group-name.bpmn');
bootstrapViewer(xml).call(this, function(err) {
inject(function(elementRegistry) {
var groupGfx = elementRegistry.getGraphics('Group_1');
expect(domQuery('.djs-label', groupGfx)).to.exist;
done(err);
})();
});
});
it('should render message marker', function(done) {
var xml = require('../../fixtures/bpmn/draw/message-marker.bpmn');
bootstrapViewer(xml).call(this, checkErrors(done));