I want to change its height。
It turned out to be 80px.
I hope it’s 50px
I want to change its height。
It turned out to be 80px.
I hope it’s 50px
The 80px in this element, I want to know where I can set it. How to set up
(这个元素中的80px,我想知道从哪里可以设置。怎么设置)
Thank you very much. This helped me. Do you know how to modify the default value conveniently?
Create a custom ElementFactory and override the _getDefaultSize
method, so something like that:
import ElementFactory from 'bpmn-js/lib/features/modeling/ElementFactory';
export default class CustomElementFactory extends ElementFactory {
constructor(bpmnFactory, moddle, translate) {
super(bpmnFactory, moddle, translate);
}
_getDefaultSize(semantic) {
if (is(semantic, 'bpmn:UserTask')) {
return { width: 100, height: 50 };
}
return super._getDefaultSize(semantic);
}
}
ElementFactory.$inject = [
'bpmnFactory',
'moddle',
'translate'
];
Thank you very much. It’s a timely help.