Element label not updating without having to manually move it

Hi,

I am updating the name and therefore label of an element as described in the FAQ.

var sequenceShape = elementRegistry.get('MySequence');
modeling.updateProperties(sequenceShape, {
  name: 'New name'
});

However my label on the element does not update until after I drag it with the mouse. i.e it doesn’t refresh.

I am having this issue with the latest version of Firefox and Chrome

I have also tried firing off the element.changed event like so,

eventBus.fire('element.changed', { element: sequenceShape });

Is this the expected behaviour?

Many thanks.

Could you build a test-case that reproduces your issue based on our modeler starter?

That would help us to understand, reproduce and fix it (if it turns out this is a bug).

thank you for the reply Nikku,

I believe I have worked out the issue. I was getting the new label value from a modal and was calling update properties before hiding the modal. If I hide the modal first then update the properties I no longer have the issue.

Many thanks