bpmn-js 9.0.3 → 9.0.4
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/CHANGELOG.md +13 -5
- package/dist/bpmn-modeler.development.js +31 -14
- package/dist/bpmn-modeler.production.min.js +3 -3
- package/dist/bpmn-navigated-viewer.development.js +38 -6
- package/dist/bpmn-navigated-viewer.production.min.js +6 -6
- package/dist/bpmn-viewer.development.js +38 -6
- package/dist/bpmn-viewer.production.min.js +6 -6
- package/lib/features/drilldown/DrilldownOverlayBehavior.js +1 -1
- package/lib/features/drilldown/SubprocessCompatibility.js +20 -3
- package/lib/features/label-editing/cmd/UpdateLabelHandler.js +1 -1
- package/lib/features/modeling/behavior/SubProcessStartEventBehavior.js +1 -1
- package/lib/features/ordering/BpmnOrderingProvider.js +1 -1
- package/lib/features/popup-menu/ReplaceMenuProvider.js +7 -6
- package/lib/import/Importer.js +1 -1
- package/package.json +1 -1
|
@@ -80,7 +80,7 @@ export default function DrilldownOverlayBehavior(
|
|
|
80
80
|
}, true);
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
eventBus.on('import.
|
|
83
|
+
eventBus.on('import.render.complete', function() {
|
|
84
84
|
elementRegistry.filter(function(e) {
|
|
85
85
|
return self.canDrillDown(e);
|
|
86
86
|
}).map(function(el) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { asBounds, asTRBL } from 'diagram-js/lib/layout/LayoutUtil';
|
|
3
|
-
import { is } from '../../util/ModelUtil';
|
|
3
|
+
import { is, isAny } from '../../util/ModelUtil';
|
|
4
4
|
|
|
5
5
|
var DEFAULT_POSITION = {
|
|
6
6
|
x: 180,
|
|
@@ -79,7 +79,7 @@ SubprocessCompatibility.prototype.createNewDiagrams = function(plane) {
|
|
|
79
79
|
collapsedElements.push(bo);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
if (
|
|
82
|
+
if (shouldMoveToPlane(bo, plane)) {
|
|
83
83
|
|
|
84
84
|
// don't change the array while we iterate over it
|
|
85
85
|
elementsToMove.push({ diElement: diElement, parent: parent });
|
|
@@ -168,7 +168,7 @@ SubprocessCompatibility.prototype.createDiagram = function(bo) {
|
|
|
168
168
|
SubprocessCompatibility.$inject = [ 'eventBus', 'moddle' ];
|
|
169
169
|
|
|
170
170
|
|
|
171
|
-
// helpers
|
|
171
|
+
// helpers //////////////////////////
|
|
172
172
|
|
|
173
173
|
function findRootDiagram(element) {
|
|
174
174
|
if (is(element, 'bpmndi:BPMNDiagram')) {
|
|
@@ -199,3 +199,20 @@ function getPlaneBounds(plane) {
|
|
|
199
199
|
|
|
200
200
|
return asBounds(planeTrbl);
|
|
201
201
|
}
|
|
202
|
+
|
|
203
|
+
function shouldMoveToPlane(bo, plane) {
|
|
204
|
+
var parent = bo.$parent;
|
|
205
|
+
|
|
206
|
+
// don't move elements that are already on the plane
|
|
207
|
+
if (!is(parent, 'bpmn:SubProcess') || parent === plane.bpmnElement) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// dataAssociations are children of the subprocess but rendered on process level
|
|
212
|
+
// cf. https://github.com/bpmn-io/bpmn-js/issues/1619
|
|
213
|
+
if (isAny(bo, ['bpmn:DataInputAssociation', 'bpmn:DataOutputAssociation'])) {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
@@ -20,7 +20,7 @@ export default function SubProcessStartEventBehavior(injector, modeling) {
|
|
|
20
20
|
|
|
21
21
|
if (
|
|
22
22
|
!is(newShape, 'bpmn:SubProcess') ||
|
|
23
|
-
!is(oldShape, 'bpmn:Task') ||
|
|
23
|
+
! (is(oldShape, 'bpmn:Task') || is(oldShape, 'bpmn:CallActivity')) ||
|
|
24
24
|
!isExpanded(newShape)
|
|
25
25
|
) {
|
|
26
26
|
return;
|
|
@@ -131,7 +131,7 @@ export default function BpmnOrderingProvider(eventBus, canvas, translate) {
|
|
|
131
131
|
// render labels always on top
|
|
132
132
|
if (element.labelTarget) {
|
|
133
133
|
return {
|
|
134
|
-
parent: canvas.findRoot(
|
|
134
|
+
parent: canvas.findRoot(newParent) || canvas.getRootElement(),
|
|
135
135
|
index: -1
|
|
136
136
|
};
|
|
137
137
|
}
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
16
|
forEach,
|
|
17
|
-
filter
|
|
17
|
+
filter,
|
|
18
|
+
isUndefined
|
|
18
19
|
} from 'min-dash';
|
|
19
20
|
|
|
20
21
|
import * as replaceOptions from '../replace/ReplaceOptions';
|
|
@@ -426,16 +427,16 @@ ReplaceMenuProvider.prototype._getLoopEntries = function(element) {
|
|
|
426
427
|
var translate = this._translate;
|
|
427
428
|
|
|
428
429
|
function toggleLoopEntry(event, entry) {
|
|
429
|
-
var loopCharacteristics;
|
|
430
|
+
var loopCharacteristics = getBusinessObject(element).loopCharacteristics;
|
|
430
431
|
|
|
431
432
|
if (entry.active) {
|
|
432
433
|
loopCharacteristics = undefined;
|
|
433
434
|
} else {
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if (entry.options.isSequential) {
|
|
437
|
-
loopCharacteristics.isSequential = entry.options.isSequential;
|
|
435
|
+
if (isUndefined(entry.options.isSequential) || !loopCharacteristics) {
|
|
436
|
+
loopCharacteristics = self._moddle.create(entry.options.loopCharacteristics);
|
|
438
437
|
}
|
|
438
|
+
|
|
439
|
+
loopCharacteristics.isSequential = entry.options.isSequential;
|
|
439
440
|
}
|
|
440
441
|
self._modeling.updateProperties(element, { loopCharacteristics: loopCharacteristics });
|
|
441
442
|
}
|
package/lib/import/Importer.js
CHANGED
|
@@ -124,7 +124,7 @@ export function importBpmnDiagram(diagram, definitions, bpmnDiagram) {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* Returns all diagrams in the same
|
|
127
|
+
* Returns all diagrams in the same hierarchy as the requested diagram.
|
|
128
128
|
* Includes all parent and sub process diagrams.
|
|
129
129
|
*
|
|
130
130
|
* @param {Array} definitions
|