Hi,
I’d like to update shapes (create them or update some props like names, descriptions, etc.) without using the command stack.
Currently, I’m using this approach:
export default class MyModeling extends BaseModeling {
...
getHandlers() {
const handlers = super.getHandlers();
handlers['element.updateProperties'] = UpdatePropertiesHandler;
return handlers;
}
...
}
export default class UpdatePropertiesHandler {
...
execute(context) {
...
context.changed = [element];
return context.changed;
}
...
}
And this is working fine when I’m explicitly invoking element.updateProperties. It also updates undo/redo stack which is good in this case.
However, I faced new requirements where data about shapes (also new shapes) can pop up asynchronously from the backend. I should be able to visualize those changes on a diagram, but without affecting undo/redo stack. Just force rendered to redraw particular elements.
Is this possible to achieve with pure diagram-js?
Thanks for your help in advance.
Regards,
Michal