How to refresh diagram to update direct changes?

Hello everyone.
I have a problem. I already wrote my own properties panel provider and everything is fine :slight_smile:
Next I did a modal, to show text in more friendly way which is triggered when i click on checkBox. That modal works too, but I need to update ‘element’ directly in ‘domDelegate.bind(…’ function. And that not fully works. Element is updating fine, but modeler doesn’t see any change, so when I want to download .bpmn file, nothing happend. To download this file I need to do anything (move element, write something in textField in properties panel), but I want to update diagram after I click “Save” button on my modal.
How to make it work?

My problem solved. To do this you need reference to eventBus and fire command:

eventBus.fire('commandStack.changed', {elements: [element] , type: 'commandStack.changed'});

After that I can download my updated diagram :wink:

1 Like