Hi every one!
Is there somehow to remove some actions from commandstack?
In my case I have this code
this.bpmnModeler.on('shape.added',(e) => {
var modeling = this.bpmnModeler.get('modeling');
var commandStack = this.bpmnModeler.get('commandStack');
switch (element.type) {
case "bpmn:StartEvent":
modeling.setColor(element, {
stroke: '#76B233'
});
break;
}
});
this code paint the start event with green color. But when I hit ctrl+z the start event becomes black.
So my question is:
How to remove the .setColor action from commandstack?
I tried to use the code below after .setColor:
var commandStack = this.bpmnModeler.get(‘commandStack’);
commandStack._stack.pop();
But when I did it, the ctrl+z and ctrl+y stop to work
– >If I put some color in another component, the behavior is the same when I hit ctrl+z