1.0.4 • Published 6 months ago

diagram-js-context-pad v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

diagram-js-context-pad

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

How to use 如何使用

  1. Add the diagram-js-context-pad to your project:
npm install diagram-js-context-pad
  1. 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
  }
})

Configurations 配置项

This module adds a new Configurations to the ContextPad.

namedesctypedefaultrequired
beauty是否开启美化后的效果booleanfalsefalse

Methods 方法

This module adds a new method to the ContextPad.

namedescargsrequired
toggleStyles切换默认显示方式与重写后的显示方式beauty?: booleanfalse

Preview 效果预览

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago