fix(draw): show labels with text

Closes #362
This commit is contained in:
Nico Rehwaldt 2015-09-14 16:03:46 +02:00
parent 63d0321210
commit 4891eb4f84
2 changed files with 22 additions and 0 deletions

View File

@ -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

View File

@ -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;
}));