MCPcopy
hub / github.com/miyuesc/bpmn-process-designer / createAction

Function createAction

packages/additional-modules/Palette/utils.js:4–25  ·  view source on GitHub ↗
(elementFactory, create, type, group, className, title, options)

Source from the content-addressed store, hash-verified

2import { notNull } from "../../../utils/tool";
3
4export function createAction(elementFactory, create, type, group, className, title, options) {
5 function createListener(event) {
6 const shape = elementFactory.createShape(assign({ type: type }, options));
7
8 if (options) {
9 !shape.businessObject.di && (shape.businessObject.di = {});
10 notNull(options.isExpanded) && (shape.businessObject.di.isExpanded = options.isExpanded);
11 }
12
13 create.start(event, shape);
14 }
15
16 return {
17 group: group,
18 className: className,
19 title: title,
20 action: {
21 dragstart: createListener,
22 click: createListener
23 }
24 };
25}

Callers 2

getPaletteEntriesMethod · 0.90
getPaletteEntriesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected