bpmn-js 11.3.1 → 11.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bpmn-modeler.development.js +54 -28
- package/dist/bpmn-modeler.production.min.js +4 -4
- package/dist/bpmn-navigated-viewer.development.js +26 -10
- package/dist/bpmn-navigated-viewer.production.min.js +3 -3
- package/dist/bpmn-viewer.development.js +22 -6
- package/dist/bpmn-viewer.production.min.js +2 -2
- package/lib/draw/BpmnRenderer.js +20 -4
- package/lib/features/create-append-anything/AppendMenuProvider.js +15 -5
- package/lib/features/create-append-anything/CreateAppendEditorActions.js +11 -4
- package/lib/features/create-append-anything/CreateAppendKeyboardBindings.js +1 -8
- package/lib/features/label-editing/LabelEditingProvider.js +1 -1
- package/package.json +2 -2
package/lib/draw/BpmnRenderer.js
CHANGED
|
@@ -177,7 +177,11 @@ export default function BpmnRenderer(
|
|
|
177
177
|
...shapeStyle({
|
|
178
178
|
fill: fill,
|
|
179
179
|
stroke: stroke,
|
|
180
|
-
strokeWidth: 1
|
|
180
|
+
strokeWidth: 1,
|
|
181
|
+
|
|
182
|
+
// fix for safari / chrome / firefox bug not correctly
|
|
183
|
+
// resetting stroke dash array
|
|
184
|
+
strokeDasharray: [ 10000, 1 ]
|
|
181
185
|
})
|
|
182
186
|
});
|
|
183
187
|
|
|
@@ -193,7 +197,11 @@ export default function BpmnRenderer(
|
|
|
193
197
|
...shapeStyle({
|
|
194
198
|
fill: fill,
|
|
195
199
|
stroke: stroke,
|
|
196
|
-
strokeWidth: 1
|
|
200
|
+
strokeWidth: 1,
|
|
201
|
+
|
|
202
|
+
// fix for safari / chrome / firefox bug not correctly
|
|
203
|
+
// resetting stroke dash array
|
|
204
|
+
strokeDasharray: [ 10000, 1 ]
|
|
197
205
|
})
|
|
198
206
|
});
|
|
199
207
|
|
|
@@ -209,7 +217,11 @@ export default function BpmnRenderer(
|
|
|
209
217
|
...lineStyle({
|
|
210
218
|
fill: 'none',
|
|
211
219
|
stroke: stroke,
|
|
212
|
-
strokeWidth: 1.5
|
|
220
|
+
strokeWidth: 1.5,
|
|
221
|
+
|
|
222
|
+
// fix for safari / chrome / firefox bug not correctly
|
|
223
|
+
// resetting stroke dash array
|
|
224
|
+
strokeDasharray: [ 10000, 1 ]
|
|
213
225
|
})
|
|
214
226
|
});
|
|
215
227
|
|
|
@@ -226,7 +238,11 @@ export default function BpmnRenderer(
|
|
|
226
238
|
...lineStyle({
|
|
227
239
|
fill: 'none',
|
|
228
240
|
stroke: stroke,
|
|
229
|
-
strokeWidth: 1.5
|
|
241
|
+
strokeWidth: 1.5,
|
|
242
|
+
|
|
243
|
+
// fix for safari / chrome / firefox bug not correctly
|
|
244
|
+
// resetting stroke dash array
|
|
245
|
+
strokeDasharray: [ 10000, 1 ]
|
|
230
246
|
})
|
|
231
247
|
});
|
|
232
248
|
|
|
@@ -10,7 +10,8 @@ export default function AppendMenuProvider(
|
|
|
10
10
|
create,
|
|
11
11
|
autoPlace,
|
|
12
12
|
rules,
|
|
13
|
-
mouse
|
|
13
|
+
mouse,
|
|
14
|
+
translate
|
|
14
15
|
) {
|
|
15
16
|
this._elementFactory = elementFactory;
|
|
16
17
|
this._popupMenu = popupMenu;
|
|
@@ -19,6 +20,7 @@ export default function AppendMenuProvider(
|
|
|
19
20
|
this._rules = rules;
|
|
20
21
|
this._create = create;
|
|
21
22
|
this._mouse = mouse;
|
|
23
|
+
this._translate = translate;
|
|
22
24
|
|
|
23
25
|
this.register();
|
|
24
26
|
}
|
|
@@ -29,7 +31,8 @@ AppendMenuProvider.$inject = [
|
|
|
29
31
|
'create',
|
|
30
32
|
'autoPlace',
|
|
31
33
|
'rules',
|
|
32
|
-
'mouse'
|
|
34
|
+
'mouse',
|
|
35
|
+
'translate'
|
|
33
36
|
];
|
|
34
37
|
|
|
35
38
|
/**
|
|
@@ -48,6 +51,8 @@ AppendMenuProvider.prototype.register = function() {
|
|
|
48
51
|
*/
|
|
49
52
|
AppendMenuProvider.prototype.getPopupMenuEntries = function(element) {
|
|
50
53
|
const rules = this._rules;
|
|
54
|
+
const translate = this._translate;
|
|
55
|
+
|
|
51
56
|
const entries = {};
|
|
52
57
|
|
|
53
58
|
if (!rules.allowed('shape.append', { element: element })) {
|
|
@@ -71,10 +76,13 @@ AppendMenuProvider.prototype.getPopupMenuEntries = function(element) {
|
|
|
71
76
|
} = option;
|
|
72
77
|
|
|
73
78
|
entries[`append-${actionName}`] = {
|
|
74
|
-
label,
|
|
79
|
+
label: label && translate(label),
|
|
75
80
|
className,
|
|
76
81
|
description,
|
|
77
|
-
group
|
|
82
|
+
group: group && {
|
|
83
|
+
...group,
|
|
84
|
+
name: translate(group.name)
|
|
85
|
+
},
|
|
78
86
|
search,
|
|
79
87
|
rank,
|
|
80
88
|
action: this._createEntryAction(element, target)
|
|
@@ -142,7 +150,9 @@ AppendMenuProvider.prototype._createEntryAction = function(element, target) {
|
|
|
142
150
|
event = mouse.getLastMoveEvent();
|
|
143
151
|
}
|
|
144
152
|
|
|
145
|
-
return create.start(event, newElement
|
|
153
|
+
return create.start(event, newElement, {
|
|
154
|
+
source: element
|
|
155
|
+
});
|
|
146
156
|
};
|
|
147
157
|
|
|
148
158
|
return {
|
|
@@ -25,16 +25,23 @@ CreateAppendEditorActions.prototype.registerActions = function() {
|
|
|
25
25
|
var selection = this._injector.get('selection', false);
|
|
26
26
|
var contextPad = this._injector.get('contextPad', false);
|
|
27
27
|
var palette = this._injector.get('palette', false);
|
|
28
|
+
var popupMenu = this._injector.get('popupMenu', false);
|
|
28
29
|
|
|
29
30
|
const actions = {};
|
|
30
31
|
|
|
31
32
|
// append
|
|
32
|
-
if (selection && contextPad) {
|
|
33
|
+
if (selection && contextPad && palette && popupMenu && palette) {
|
|
33
34
|
assign(actions, {
|
|
34
35
|
'appendElement': function(event) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const selected = selection && selection.get();
|
|
37
|
+
|
|
38
|
+
if (selected.length == 1 && !popupMenu.isEmpty(selected[0], 'bpmn-append')) {
|
|
39
|
+
contextPad.triggerEntry('append', 'click', event);
|
|
40
|
+
} else {
|
|
41
|
+
palette.triggerEntry('create', 'click', event);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
// create
|
|
@@ -13,7 +13,6 @@ export default function CreateAppendKeyboardBindings(injector) {
|
|
|
13
13
|
this._injector = injector;
|
|
14
14
|
this._keyboard = this._injector.get('keyboard', false);
|
|
15
15
|
this._editorActions = this._injector.get('editorActions', false);
|
|
16
|
-
this._selection = this._injector.get('selection', false);
|
|
17
16
|
|
|
18
17
|
if (this._keyboard) {
|
|
19
18
|
this._injector.invoke(KeyboardBindings, this);
|
|
@@ -37,7 +36,6 @@ CreateAppendKeyboardBindings.prototype.registerBindings = function() {
|
|
|
37
36
|
|
|
38
37
|
var keyboard = this._keyboard;
|
|
39
38
|
var editorActions = this._editorActions;
|
|
40
|
-
var selection = this._selection;
|
|
41
39
|
|
|
42
40
|
// inherit default bindings
|
|
43
41
|
KeyboardBindings.prototype.registerBindings.call(this, keyboard, editorActions);
|
|
@@ -68,12 +66,7 @@ CreateAppendKeyboardBindings.prototype.registerBindings = function() {
|
|
|
68
66
|
|
|
69
67
|
if (keyboard && keyboard.isKey([ 'a', 'A' ], event)) {
|
|
70
68
|
|
|
71
|
-
|
|
72
|
-
editorActions && editorActions.trigger('appendElement', event);
|
|
73
|
-
} else {
|
|
74
|
-
editorActions && editorActions.trigger('createElement', event);
|
|
75
|
-
}
|
|
76
|
-
|
|
69
|
+
editorActions && editorActions.trigger('appendElement', event);
|
|
77
70
|
return true;
|
|
78
71
|
}
|
|
79
72
|
});
|
|
@@ -114,7 +114,7 @@ export default function LabelEditingProvider(
|
|
|
114
114
|
|
|
115
115
|
function activateDirectEdit(element, force) {
|
|
116
116
|
if (force ||
|
|
117
|
-
isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation' ]) ||
|
|
117
|
+
isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation', 'bpmn:Participant' ]) ||
|
|
118
118
|
isCollapsedSubProcess(element)) {
|
|
119
119
|
|
|
120
120
|
directEditing.activate(element);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmn-js",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.4.1",
|
|
4
4
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"bpmn-moddle": "^8.0.0",
|
|
103
103
|
"css.escape": "^1.5.1",
|
|
104
|
-
"diagram-js": "^11.9.
|
|
104
|
+
"diagram-js": "^11.9.1",
|
|
105
105
|
"diagram-js-direct-editing": "^2.0.0",
|
|
106
106
|
"ids": "^1.0.0",
|
|
107
107
|
"inherits-browser": "^0.1.0",
|