mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-11 09:36:07 +00:00
parent
63d0321210
commit
4891eb4f84
@ -87,6 +87,9 @@ UpdatePropertiesHandler.prototype.execute = function(context) {
|
||||
|
||||
if (NAME in properties && element.label) {
|
||||
changed.push(element.label);
|
||||
|
||||
// show the label
|
||||
element.label.hidden = false;
|
||||
}
|
||||
|
||||
// update properties
|
||||
|
@ -70,6 +70,22 @@ describe('features/modeling - update properties', function() {
|
||||
}));
|
||||
|
||||
|
||||
it('setting name', inject(function(elementRegistry, modeling) {
|
||||
|
||||
// given
|
||||
var flowConnection = elementRegistry.get('SequenceFlow_4');
|
||||
|
||||
// when
|
||||
modeling.updateProperties(flowConnection, { name: 'FOO BAR' });
|
||||
|
||||
// then
|
||||
expect(flowConnection.businessObject.name).to.equal('FOO BAR');
|
||||
|
||||
// flow label is now shown
|
||||
expect(flowConnection.label.hidden).to.be.false;
|
||||
}));
|
||||
|
||||
|
||||
it('updating name', inject(function(elementRegistry, modeling) {
|
||||
|
||||
// given
|
||||
@ -96,6 +112,9 @@ describe('features/modeling - update properties', function() {
|
||||
|
||||
// then
|
||||
expect(flowConnection.businessObject.name).not.to.be.defined;
|
||||
|
||||
// flow label is now hidden
|
||||
expect(flowConnection.label.hidden).to.be.true;
|
||||
}));
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user