Skip to content

Commit

Permalink
fix: contextpad 事件异常
Browse files Browse the repository at this point in the history
  • Loading branch information
miyuesc committed Aug 8, 2023
1 parent 6d89ec3 commit 9b71d11
Showing 1 changed file with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,30 @@ class EnhancementContextPadProvider extends ContextPadProvider {
const actions = {};
const modeling = this._modeling;

const appendUserTask = (event, element) => {
const shape = this._elementFactory.createShape({ type: "bpmn:UserTask" });
this._create.start(event, shape, {
source: element
});
};

const append = this._autoPlace
? (event, element) => {
const shape = this._elementFactory.createShape({ type: "bpmn:UserTask" });
this._autoPlace.append(element, shape);
}
: appendUserTask;

// 添加创建用户任务按钮
actions["append.append-user-task"] = {
group: "model",
className: "bpmn-icon-user-task",
title: "用户任务",
action: {
dragstart: appendUserTask,
click: append
}
};
// const appendUserTask = (event, element) => {
// const shape = this._elementFactory.createShape({ type: "bpmn:UserTask" });
// this._create.start(event, shape, {
// source: element
// });
// };
//
// const append = this._autoPlace
// ? (event, element) => {
// const shape = this._elementFactory.createShape({ type: "bpmn:UserTask" });
// this._autoPlace.append(element, shape);
// }
// : appendUserTask;
//
// // 添加创建用户任务按钮
// actions["append.append-user-task"] = {
// group: "model",
// className: "bpmn-icon-user-task",
// title: "用户任务",
// action: {
// dragstart: appendUserTask,
// click: append
// }
// };

// 添加一个与edit一组的按钮
actions["enhancement-op-1"] = {
Expand Down

0 comments on commit 9b71d11

Please sign in to comment.