Merge branch 'master' into develop
This commit is contained in:
commit
33f5f2d663
|
@ -6,6 +6,14 @@ All notable changes to [bpmn-js](https://github.com/bpmn-io/bpmn-js) are documen
|
|||
|
||||
___Note:__ Yet to be released changes appear here._
|
||||
|
||||
## 6.4.0
|
||||
|
||||
* `FEAT`: serialize link events with an empty name ([#1296](https://github.com/bpmn-io/bpmn-js/issues/1296))
|
||||
|
||||
## 6.3.5
|
||||
|
||||
* `FIX`: correct accidental resizing of label target ([#1294](https://github.com/bpmn-io/bpmn-js/issues/1294))
|
||||
|
||||
## 6.3.4
|
||||
|
||||
* `FIX`: export BPMNDI in correct order ([#985](https://github.com/bpmn-io/bpmn-js/issues/985))
|
||||
|
|
|
@ -88,6 +88,11 @@ export default function UpdateLabelHandler(modeling, textRenderer) {
|
|||
newBounds = ctx.newBounds,
|
||||
hints = ctx.hints || {};
|
||||
|
||||
// ignore internal labels for elements except text annotations
|
||||
if (!isLabel(label) && !is(label, 'bpmn:TextAnnotation')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isLabel(label) && isEmptyText(newLabel)) {
|
||||
|
||||
if (hints.removeShape !== false) {
|
||||
|
@ -97,11 +102,6 @@ export default function UpdateLabelHandler(modeling, textRenderer) {
|
|||
return;
|
||||
}
|
||||
|
||||
// ignore internal labels for elements except text annotations
|
||||
if (!isLabelExternal(element) && !is(element, 'bpmn:TextAnnotation')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var text = getLabel(label);
|
||||
|
||||
// resize element based on label _or_ pre-defined bounds
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bpmn-js",
|
||||
"version": "6.3.4",
|
||||
"version": "6.4.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bpmn-js",
|
||||
"version": "6.3.4",
|
||||
"version": "6.4.0",
|
||||
"description": "A bpmn 2.0 toolkit and web modeler",
|
||||
"scripts": {
|
||||
"all": "run-s lint test distro test:distro",
|
||||
|
|
|
@ -50,6 +50,27 @@ describe('features/modeling - update label', function() {
|
|||
));
|
||||
|
||||
|
||||
it('should not create label on empty text', inject(
|
||||
function(modeling, elementRegistry) {
|
||||
|
||||
// given
|
||||
var startEvent_2 = elementRegistry.get('StartEvent_2');
|
||||
|
||||
// when
|
||||
modeling.updateLabel(startEvent_2, '');
|
||||
|
||||
// then
|
||||
expect(startEvent_2.businessObject.name).to.equal('');
|
||||
expect(startEvent_2.label).not.to.exist;
|
||||
|
||||
expect(startEvent_2).to.have.dimensions({
|
||||
width: 36,
|
||||
height: 36
|
||||
});
|
||||
}
|
||||
));
|
||||
|
||||
|
||||
describe('should delete label', function() {
|
||||
|
||||
it('when setting null', inject(
|
||||
|
|
Loading…
Reference in New Issue