刘光辉
8 小时以前 0dfe84494048ce27ba8449831782128412d3eb13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import ContextPadProvider from 'bpmn-js/lib/features/context-pad/ContextPadProvider';
import CustomizeContextPad from './CustomizeContextPad';
class YmContextPadProvider extends ContextPadProvider {
  _modeling: any;
  _rules: any;
  _eventBus: any;
  _injector: any;
  _commandStack: any;
  constructor(
    config: any,
    injector: any,
    eventBus: any,
    contextPad: any,
    modeling: any,
    elementFactory: any,
    connect: any,
    create: any,
    popupMenu: any,
    canvas: any,
    rules: any,
    translate: any,
    commandStack: any,
  ) {
    super(config, injector, eventBus, contextPad, modeling, elementFactory, connect, create, popupMenu, canvas, rules, translate);
    this._rules = rules;
    this._modeling = modeling;
    this._injector = injector;
    this._eventBus = eventBus;
    this._commandStack = commandStack;
  }
 
  getContextPadEntries(element: any): (() => any) | any | undefined {
    return CustomizeContextPad(this, element);
  }
 
  // 多个元素框选时 默认包含框选删除元素
  getMultiElementContextPadEntries() {
    var actions = {};
    return actions;
  }
}
 
YmContextPadProvider.$inject = [
  'config.contextPad',
  'injector',
  'eventBus',
  'contextPad',
  'modeling',
  'elementFactory',
  'connect',
  'create',
  'popupMenu',
  'canvas',
  'rules',
  'translate',
  'commandStack',
];
 
export default YmContextPadProvider;