An element context menu component for diagram-js/bpmn-js use, base on diagram-js/lib/features/context-pad.
一个提供给 diagram-js/bpmn-js 使用的元素上下文菜单组件,基于 diagram-js/lib/features/context-pad
。
- Add the diagram-js-context-pad to your project:
npm install diagram-js-context-pad
- Add it to the additionalModules Array
import Modeler from 'bpmn-js/lib/Modeler'
import ContextPadModule from 'diagram-js-context-pad'
const modeler = new Modeler({
container: '#container',
additionalModules: [
// ...
ContextPadModule
],
contextPad: {
beauty: true
}
})
This module adds a new Configurations to the ContextPad.
name | desc | type | default | required |
---|---|---|---|---|
beauty | 是否开启美化后的效果 | boolean | false | false |
This module adds a new method to the ContextPad.
name | desc | args | required |
---|---|---|---|
toggleStyles | 切换默认显示方式与重写后的显示方式 | beauty?: boolean | false |