bpmn-js 8.8.1 → 8.9.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/CHANGELOG.md +26 -0
- package/dist/assets/diagram-js.css +82 -78
- package/dist/bpmn-modeler.development.js +169 -134
- package/dist/bpmn-modeler.production.min.js +6 -6
- package/dist/bpmn-navigated-viewer.development.js +41 -28
- package/dist/bpmn-navigated-viewer.production.min.js +2 -2
- package/dist/bpmn-viewer.development.js +41 -28
- package/dist/bpmn-viewer.production.min.js +2 -2
- package/lib/features/copy-paste/ModdleCopy.js +15 -3
- package/lib/features/label-editing/LabelEditingProvider.js +1 -1
- package/lib/features/modeling/BpmnFactory.js +6 -1
- package/lib/features/modeling/behavior/CreateParticipantBehavior.js +59 -84
- package/lib/features/modeling/behavior/DropOnFlowBehavior.js +2 -2
- package/lib/features/modeling/behavior/UnclaimIdBehavior.js +3 -1
- package/lib/features/modeling/cmd/SetColorHandler.js +20 -6
- package/lib/features/palette/PaletteProvider.js +1 -1
- package/lib/features/popup-menu/ReplaceMenuProvider.js +1 -1
- package/package.json +2 -2
- package/test/util/MockEvents.js +10 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler v8.
|
|
2
|
+
* bpmn-js - bpmn-modeler v8.9.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-present, camunda Services GmbH
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Source Code: https://github.com/bpmn-io/bpmn-js
|
|
10
10
|
*
|
|
11
|
-
* Date:
|
|
11
|
+
* Date: 2022-01-24
|
|
12
12
|
*/
|
|
13
13
|
(function (global, factory) {
|
|
14
14
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -2337,13 +2337,14 @@
|
|
|
2337
2337
|
eventBus.on([ 'render.shape', 'render.connection' ], renderPriority, function(evt, context) {
|
|
2338
2338
|
var type = evt.type,
|
|
2339
2339
|
element = context.element,
|
|
2340
|
-
visuals = context.gfx
|
|
2340
|
+
visuals = context.gfx,
|
|
2341
|
+
attrs = context.attrs;
|
|
2341
2342
|
|
|
2342
2343
|
if (self.canRender(element)) {
|
|
2343
2344
|
if (type === 'render.shape') {
|
|
2344
|
-
return self.drawShape(visuals, element);
|
|
2345
|
+
return self.drawShape(visuals, element, attrs);
|
|
2345
2346
|
} else {
|
|
2346
|
-
return self.drawConnection(visuals, element);
|
|
2347
|
+
return self.drawConnection(visuals, element, attrs);
|
|
2347
2348
|
}
|
|
2348
2349
|
}
|
|
2349
2350
|
});
|
|
@@ -2803,7 +2804,7 @@
|
|
|
2803
2804
|
return true;
|
|
2804
2805
|
};
|
|
2805
2806
|
|
|
2806
|
-
DefaultRenderer.prototype.drawShape = function drawShape(visuals, element) {
|
|
2807
|
+
DefaultRenderer.prototype.drawShape = function drawShape(visuals, element, attrs) {
|
|
2807
2808
|
var rect = create$1('rect');
|
|
2808
2809
|
|
|
2809
2810
|
attr(rect, {
|
|
@@ -2814,9 +2815,9 @@
|
|
|
2814
2815
|
});
|
|
2815
2816
|
|
|
2816
2817
|
if (isFrameElement$1(element)) {
|
|
2817
|
-
attr(rect, this.FRAME_STYLE);
|
|
2818
|
+
attr(rect, assign({}, this.FRAME_STYLE, attrs || {}));
|
|
2818
2819
|
} else {
|
|
2819
|
-
attr(rect, this.SHAPE_STYLE);
|
|
2820
|
+
attr(rect, assign({}, this.SHAPE_STYLE, attrs || {}));
|
|
2820
2821
|
}
|
|
2821
2822
|
|
|
2822
2823
|
append(visuals, rect);
|
|
@@ -2824,9 +2825,9 @@
|
|
|
2824
2825
|
return rect;
|
|
2825
2826
|
};
|
|
2826
2827
|
|
|
2827
|
-
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection) {
|
|
2828
|
+
DefaultRenderer.prototype.drawConnection = function drawConnection(visuals, connection, attrs) {
|
|
2828
2829
|
|
|
2829
|
-
var line = createLine(connection.waypoints, this.CONNECTION_STYLE);
|
|
2830
|
+
var line = createLine(connection.waypoints, assign({}, this.CONNECTION_STYLE, attrs || {}));
|
|
2830
2831
|
append(visuals, line);
|
|
2831
2832
|
|
|
2832
2833
|
return line;
|
|
@@ -4365,6 +4366,10 @@
|
|
|
4365
4366
|
var BASE_LAYER = 'base';
|
|
4366
4367
|
var HIDDEN_MARKER = 'djs-element-hidden';
|
|
4367
4368
|
|
|
4369
|
+
// render plane contents behind utility layers
|
|
4370
|
+
var PLANE_LAYER_INDEX = 0;
|
|
4371
|
+
var UTILITY_LAYER_INDEX = 1;
|
|
4372
|
+
|
|
4368
4373
|
|
|
4369
4374
|
var REQUIRED_MODEL_ATTRS = {
|
|
4370
4375
|
shape: [ 'x', 'y', 'width', 'height' ],
|
|
@@ -4463,7 +4468,8 @@
|
|
|
4463
4468
|
'connection.added',
|
|
4464
4469
|
'shape.removed',
|
|
4465
4470
|
'connection.removed',
|
|
4466
|
-
'elements.changed'
|
|
4471
|
+
'elements.changed',
|
|
4472
|
+
'plane.set'
|
|
4467
4473
|
], function() {
|
|
4468
4474
|
delete this._cachedViewbox;
|
|
4469
4475
|
}, this);
|
|
@@ -4524,7 +4530,7 @@
|
|
|
4524
4530
|
* @returns {SVGElement}
|
|
4525
4531
|
*/
|
|
4526
4532
|
Canvas.prototype.getDefaultLayer = function() {
|
|
4527
|
-
return this.getLayer(BASE_LAYER);
|
|
4533
|
+
return this.getLayer(BASE_LAYER, PLANE_LAYER_INDEX);
|
|
4528
4534
|
};
|
|
4529
4535
|
|
|
4530
4536
|
/**
|
|
@@ -4573,8 +4579,8 @@
|
|
|
4573
4579
|
*/
|
|
4574
4580
|
Canvas.prototype._createLayer = function(name, index) {
|
|
4575
4581
|
|
|
4576
|
-
if (
|
|
4577
|
-
index =
|
|
4582
|
+
if (typeof index === 'undefined') {
|
|
4583
|
+
index = UTILITY_LAYER_INDEX;
|
|
4578
4584
|
}
|
|
4579
4585
|
|
|
4580
4586
|
var childIndex = reduce(this._layers, function(childIndex, layer) {
|
|
@@ -4604,9 +4610,7 @@
|
|
|
4604
4610
|
throw new Error('must specify a name');
|
|
4605
4611
|
}
|
|
4606
4612
|
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
return plane;
|
|
4613
|
+
return this._planes[name];
|
|
4610
4614
|
};
|
|
4611
4615
|
|
|
4612
4616
|
/**
|
|
@@ -4635,7 +4639,7 @@
|
|
|
4635
4639
|
};
|
|
4636
4640
|
}
|
|
4637
4641
|
|
|
4638
|
-
var svgLayer = this.getLayer(name);
|
|
4642
|
+
var svgLayer = this.getLayer(name, PLANE_LAYER_INDEX);
|
|
4639
4643
|
classes(svgLayer).add(HIDDEN_MARKER);
|
|
4640
4644
|
|
|
4641
4645
|
var plane = this._planes[name] = {
|
|
@@ -5244,9 +5248,10 @@
|
|
|
5244
5248
|
if (!box) {
|
|
5245
5249
|
|
|
5246
5250
|
// compute the inner box based on the
|
|
5247
|
-
// diagrams
|
|
5251
|
+
// diagrams active plane. This allows us to exclude
|
|
5248
5252
|
// external components, such as overlays
|
|
5249
|
-
|
|
5253
|
+
|
|
5254
|
+
innerBox = (this._activePlane && this._activePlane.layer.getBBox()) || {};
|
|
5250
5255
|
|
|
5251
5256
|
transform = transform$1(viewport);
|
|
5252
5257
|
matrix = transform ? transform.matrix : createMatrix();
|
|
@@ -5262,10 +5267,10 @@
|
|
|
5262
5267
|
height: outerBox.height / scale,
|
|
5263
5268
|
scale: scale,
|
|
5264
5269
|
inner: {
|
|
5265
|
-
width: innerBox.width,
|
|
5266
|
-
height: innerBox.height,
|
|
5267
|
-
x: innerBox.x,
|
|
5268
|
-
y: innerBox.y
|
|
5270
|
+
width: innerBox.width || 0,
|
|
5271
|
+
height: innerBox.height || 0,
|
|
5272
|
+
x: innerBox.x || 0,
|
|
5273
|
+
y: innerBox.y || 0
|
|
5269
5274
|
},
|
|
5270
5275
|
outer: outerBox
|
|
5271
5276
|
};
|
|
@@ -5318,13 +5323,17 @@
|
|
|
5318
5323
|
* Scrolls the viewbox to contain the given element.
|
|
5319
5324
|
* Optionally specify a padding to be applied to the edges.
|
|
5320
5325
|
*
|
|
5321
|
-
* @param {Object} [element] the element to scroll to.
|
|
5326
|
+
* @param {Object|String} [element] the element to scroll to.
|
|
5322
5327
|
* @param {Object|Number} [padding=100] the padding to be applied. Can also specify top, bottom, left and right.
|
|
5323
5328
|
*
|
|
5324
5329
|
*/
|
|
5325
5330
|
Canvas.prototype.scrollToElement = function(element, padding) {
|
|
5326
5331
|
var defaultPadding = 100;
|
|
5327
5332
|
|
|
5333
|
+
if (typeof element === 'string') {
|
|
5334
|
+
element = this._elementRegistry.get(element);
|
|
5335
|
+
}
|
|
5336
|
+
|
|
5328
5337
|
// switch to correct Plane
|
|
5329
5338
|
var targetPlane = this.findPlane(element);
|
|
5330
5339
|
if (targetPlane !== this._activePlane) {
|
|
@@ -21491,22 +21500,26 @@
|
|
|
21491
21500
|
|
|
21492
21501
|
Overlays.prototype._updateOverlayVisibilty = function(overlay, viewbox) {
|
|
21493
21502
|
var show = overlay.show,
|
|
21503
|
+
plane = overlay.plane,
|
|
21494
21504
|
minZoom = show && show.minZoom,
|
|
21495
21505
|
maxZoom = show && show.maxZoom,
|
|
21496
21506
|
htmlContainer = overlay.htmlContainer,
|
|
21507
|
+
activePlane = this._canvas.getActivePlane(),
|
|
21497
21508
|
visible = true;
|
|
21498
21509
|
|
|
21499
|
-
if (
|
|
21510
|
+
if (plane !== activePlane) {
|
|
21511
|
+
visible = false;
|
|
21512
|
+
} else if (show) {
|
|
21500
21513
|
if (
|
|
21501
21514
|
(isDefined(minZoom) && minZoom > viewbox.scale) ||
|
|
21502
21515
|
(isDefined(maxZoom) && maxZoom < viewbox.scale)
|
|
21503
21516
|
) {
|
|
21504
21517
|
visible = false;
|
|
21505
21518
|
}
|
|
21506
|
-
|
|
21507
|
-
setVisible$1(htmlContainer, visible);
|
|
21508
21519
|
}
|
|
21509
21520
|
|
|
21521
|
+
setVisible$1(htmlContainer, visible);
|
|
21522
|
+
|
|
21510
21523
|
this._updateOverlayScale(overlay, viewbox);
|
|
21511
21524
|
};
|
|
21512
21525
|
|
|
@@ -25500,14 +25513,23 @@
|
|
|
25500
25513
|
// the touch recognizer
|
|
25501
25514
|
var recognizer;
|
|
25502
25515
|
|
|
25503
|
-
function handler(type) {
|
|
25516
|
+
function handler(type, buttonType) {
|
|
25504
25517
|
|
|
25505
25518
|
return function(event) {
|
|
25506
25519
|
|
|
25507
|
-
|
|
25520
|
+
var gfx = getGfx(event.target),
|
|
25521
|
+
element = gfx && elementRegistry.get(gfx);
|
|
25522
|
+
|
|
25523
|
+
// translate into an actual mouse click event
|
|
25524
|
+
if (buttonType) {
|
|
25525
|
+
event.srcEvent.button = buttonType;
|
|
25526
|
+
}
|
|
25527
|
+
|
|
25528
|
+
return interactionEvents.fire(type, event, element);
|
|
25508
25529
|
};
|
|
25509
25530
|
}
|
|
25510
25531
|
|
|
25532
|
+
|
|
25511
25533
|
function getGfx(target) {
|
|
25512
25534
|
var node = closest(target, 'svg, .djs-element', true);
|
|
25513
25535
|
return node;
|
|
@@ -25518,10 +25540,6 @@
|
|
|
25518
25540
|
// touch recognizer
|
|
25519
25541
|
recognizer = createTouchRecognizer(svg);
|
|
25520
25542
|
|
|
25521
|
-
recognizer.on('doubletap', handler('element.dblclick'));
|
|
25522
|
-
|
|
25523
|
-
recognizer.on('tap', handler('element.click'));
|
|
25524
|
-
|
|
25525
25543
|
function startGrabCanvas(event) {
|
|
25526
25544
|
|
|
25527
25545
|
var lx = 0, ly = 0;
|
|
@@ -25589,6 +25607,9 @@
|
|
|
25589
25607
|
recognizer.on('pinchcancel', end);
|
|
25590
25608
|
}
|
|
25591
25609
|
|
|
25610
|
+
recognizer.on('tap', handler('element.click'));
|
|
25611
|
+
recognizer.on('doubletap', handler('element.dblclick', 1));
|
|
25612
|
+
|
|
25592
25613
|
recognizer.on('panstart', startGrab);
|
|
25593
25614
|
recognizer.on('press', startGrab);
|
|
25594
25615
|
|
|
@@ -33789,9 +33810,9 @@
|
|
|
33789
33810
|
return;
|
|
33790
33811
|
}
|
|
33791
33812
|
|
|
33792
|
-
//
|
|
33793
|
-
if (propertyDescriptor.isId
|
|
33794
|
-
return;
|
|
33813
|
+
// copy id
|
|
33814
|
+
if (propertyDescriptor.isId) {
|
|
33815
|
+
return this._copyId(property, parent);
|
|
33795
33816
|
}
|
|
33796
33817
|
|
|
33797
33818
|
// copy arrays
|
|
@@ -33832,6 +33853,18 @@
|
|
|
33832
33853
|
return property;
|
|
33833
33854
|
};
|
|
33834
33855
|
|
|
33856
|
+
ModdleCopy.prototype._copyId = function(id, element) {
|
|
33857
|
+
|
|
33858
|
+
// disallow if already taken
|
|
33859
|
+
if (this._moddle.ids.assigned(id)) {
|
|
33860
|
+
return;
|
|
33861
|
+
} else {
|
|
33862
|
+
|
|
33863
|
+
this._moddle.ids.claim(id, element);
|
|
33864
|
+
return id;
|
|
33865
|
+
}
|
|
33866
|
+
};
|
|
33867
|
+
|
|
33835
33868
|
// helpers //////////
|
|
33836
33869
|
|
|
33837
33870
|
function getPropertyNames(descriptor, keepDefaultProperties) {
|
|
@@ -35173,7 +35206,7 @@
|
|
|
35173
35206
|
return this._createEntries(element, DATA_OBJECT_REFERENCE);
|
|
35174
35207
|
}
|
|
35175
35208
|
|
|
35176
|
-
if (is$1(businessObject, 'bpmn:DataStoreReference')) {
|
|
35209
|
+
if (is$1(businessObject, 'bpmn:DataStoreReference') && !is$1(element.parent, 'bpmn:Collaboration')) {
|
|
35177
35210
|
return this._createEntries(element, DATA_STORE_REFERENCE);
|
|
35178
35211
|
}
|
|
35179
35212
|
|
|
@@ -39174,7 +39207,7 @@
|
|
|
39174
39207
|
|
|
39175
39208
|
function activateDirectEdit(element, force) {
|
|
39176
39209
|
if (force ||
|
|
39177
|
-
isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation'
|
|
39210
|
+
isAny(element, [ 'bpmn:Task', 'bpmn:TextAnnotation' ]) ||
|
|
39178
39211
|
isCollapsedSubProcess(element)) {
|
|
39179
39212
|
|
|
39180
39213
|
directEditing.activate(element);
|
|
@@ -40516,122 +40549,97 @@
|
|
|
40516
40549
|
}
|
|
40517
40550
|
});
|
|
40518
40551
|
|
|
40519
|
-
|
|
40520
|
-
|
|
40521
|
-
collaboration;
|
|
40522
|
-
|
|
40552
|
+
// turn process into collaboration when creating first participant
|
|
40553
|
+
function getOrCreateCollaboration() {
|
|
40523
40554
|
var rootElement = canvas.getRootElement();
|
|
40524
40555
|
|
|
40525
40556
|
if (is$1(rootElement, 'bpmn:Collaboration')) {
|
|
40526
|
-
|
|
40527
|
-
} else {
|
|
40528
|
-
|
|
40529
|
-
// update root element by making collaboration
|
|
40530
|
-
collaboration = modeling.makeCollaboration();
|
|
40531
|
-
|
|
40532
|
-
// re-use process when creating first participant
|
|
40533
|
-
context.process = parent;
|
|
40557
|
+
return rootElement;
|
|
40534
40558
|
}
|
|
40535
40559
|
|
|
40536
|
-
|
|
40560
|
+
return modeling.makeCollaboration();
|
|
40537
40561
|
}
|
|
40538
40562
|
|
|
40539
|
-
//
|
|
40540
|
-
|
|
40541
|
-
|
|
40542
|
-
|
|
40543
|
-
|
|
40544
|
-
|
|
40545
|
-
|
|
40546
|
-
}
|
|
40547
|
-
}, true);
|
|
40548
|
-
|
|
40549
|
-
this.execute('shape.create', function(context) {
|
|
40550
|
-
var process = context.process,
|
|
40551
|
-
shape = context.shape;
|
|
40552
|
-
|
|
40553
|
-
if (process) {
|
|
40554
|
-
context.oldProcessRef = shape.businessObject.processRef;
|
|
40555
|
-
|
|
40556
|
-
// re-use process when creating first participant
|
|
40557
|
-
shape.businessObject.processRef = process.businessObject;
|
|
40558
|
-
}
|
|
40559
|
-
}, true);
|
|
40563
|
+
// when creating mutliple elements through `elements.create` parent must be set to collaboration
|
|
40564
|
+
// and passed to `shape.create` as hint
|
|
40565
|
+
this.preExecute('elements.create', HIGH_PRIORITY$a, function(context) {
|
|
40566
|
+
var elements = context.elements,
|
|
40567
|
+
parent = context.parent,
|
|
40568
|
+
participant = findParticipant(elements),
|
|
40569
|
+
hints;
|
|
40560
40570
|
|
|
40561
|
-
|
|
40562
|
-
|
|
40563
|
-
shape = context.shape;
|
|
40571
|
+
if (participant && is$1(parent, 'bpmn:Process')) {
|
|
40572
|
+
context.parent = getOrCreateCollaboration();
|
|
40564
40573
|
|
|
40565
|
-
|
|
40574
|
+
hints = context.hints = context.hints || {};
|
|
40566
40575
|
|
|
40567
|
-
|
|
40568
|
-
|
|
40576
|
+
hints.participant = participant;
|
|
40577
|
+
hints.process = parent;
|
|
40578
|
+
hints.processRef = getBusinessObject(participant).get('processRef');
|
|
40569
40579
|
}
|
|
40570
40580
|
}, true);
|
|
40571
40581
|
|
|
40572
|
-
|
|
40573
|
-
|
|
40582
|
+
// when creating single shape through `shape.create` parent must be set to collaboration
|
|
40583
|
+
// unless it was already set through `elements.create`
|
|
40584
|
+
this.preExecute('shape.create', function(context) {
|
|
40585
|
+
var parent = context.parent,
|
|
40574
40586
|
shape = context.shape;
|
|
40575
40587
|
|
|
40576
|
-
if (
|
|
40577
|
-
|
|
40578
|
-
// move children from process to participant
|
|
40579
|
-
var processChildren = process.children.slice();
|
|
40588
|
+
if (is$1(shape, 'bpmn:Participant') && is$1(parent, 'bpmn:Process')) {
|
|
40589
|
+
context.parent = getOrCreateCollaboration();
|
|
40580
40590
|
|
|
40581
|
-
|
|
40591
|
+
context.process = parent;
|
|
40592
|
+
context.processRef = getBusinessObject(shape).get('processRef');
|
|
40582
40593
|
}
|
|
40583
|
-
|
|
40584
40594
|
}, true);
|
|
40585
40595
|
|
|
40586
|
-
//
|
|
40587
|
-
this.
|
|
40588
|
-
var
|
|
40589
|
-
|
|
40590
|
-
|
|
40591
|
-
|
|
40592
|
-
var hasParticipants = findParticipant(elements);
|
|
40593
|
-
|
|
40594
|
-
if (hasParticipants && is$1(parent, 'bpmn:Process')) {
|
|
40595
|
-
ensureCollaboration(context);
|
|
40596
|
-
|
|
40597
|
-
participant = findParticipant(elements);
|
|
40596
|
+
// #execute necessary because #preExecute not called on CommandStack#redo
|
|
40597
|
+
this.execute('shape.create', function(context) {
|
|
40598
|
+
var hints = context.hints || {},
|
|
40599
|
+
process = context.process || hints.process,
|
|
40600
|
+
shape = context.shape,
|
|
40601
|
+
participant = hints.participant;
|
|
40598
40602
|
|
|
40599
|
-
|
|
40603
|
+
// both shape.create and elements.create must be handled
|
|
40604
|
+
if (process && (!participant || shape === participant)) {
|
|
40600
40605
|
|
|
40601
|
-
//
|
|
40602
|
-
|
|
40606
|
+
// monkey-patch process ref
|
|
40607
|
+
getBusinessObject(shape).set('processRef', getBusinessObject(process));
|
|
40603
40608
|
}
|
|
40604
40609
|
}, true);
|
|
40605
40610
|
|
|
40606
|
-
this.revert('
|
|
40607
|
-
var
|
|
40608
|
-
process = context.process,
|
|
40609
|
-
|
|
40611
|
+
this.revert('shape.create', function(context) {
|
|
40612
|
+
var hints = context.hints || {},
|
|
40613
|
+
process = context.process || hints.process,
|
|
40614
|
+
processRef = context.processRef || hints.processRef,
|
|
40615
|
+
shape = context.shape,
|
|
40616
|
+
participant = hints.participant;
|
|
40610
40617
|
|
|
40611
|
-
|
|
40612
|
-
|
|
40618
|
+
// both shape.create and elements.create must be handled
|
|
40619
|
+
if (process && (!participant || shape === participant)) {
|
|
40613
40620
|
|
|
40614
|
-
//
|
|
40615
|
-
|
|
40621
|
+
// monkey-patch process ref
|
|
40622
|
+
getBusinessObject(shape).set('processRef', processRef);
|
|
40616
40623
|
}
|
|
40617
40624
|
}, true);
|
|
40618
40625
|
|
|
40619
|
-
this.postExecute('
|
|
40620
|
-
var
|
|
40621
|
-
process = context.process,
|
|
40622
|
-
|
|
40626
|
+
this.postExecute('shape.create', function(context) {
|
|
40627
|
+
var hints = context.hints || {},
|
|
40628
|
+
process = context.process || context.hints.process,
|
|
40629
|
+
shape = context.shape,
|
|
40630
|
+
participant = hints.participant;
|
|
40623
40631
|
|
|
40624
40632
|
if (process) {
|
|
40625
|
-
|
|
40626
|
-
|
|
40627
|
-
// move children from process to first participant
|
|
40628
|
-
var processChildren = process.children.slice();
|
|
40633
|
+
var children = process.children.slice();
|
|
40629
40634
|
|
|
40630
|
-
|
|
40635
|
+
// both shape.create and elements.create must be handled
|
|
40636
|
+
if (!participant) {
|
|
40637
|
+
modeling.moveElements(children, { x: 0, y: 0 }, shape);
|
|
40638
|
+
} else if (shape === participant) {
|
|
40639
|
+
modeling.moveElements(children, { x: 0, y: 0 }, participant);
|
|
40640
|
+
}
|
|
40631
40641
|
}
|
|
40632
|
-
|
|
40633
40642
|
}, true);
|
|
40634
|
-
|
|
40635
40643
|
}
|
|
40636
40644
|
|
|
40637
40645
|
CreateParticipantBehavior.$inject = [
|
|
@@ -41280,12 +41288,12 @@
|
|
|
41280
41288
|
dockingPoint = intersection.bendpoint ? waypoints[intersection.index] : mid;
|
|
41281
41289
|
|
|
41282
41290
|
// if last waypointBefore is inside shape's bounds, ignore docking point
|
|
41283
|
-
if (!isPointInsideBBox(shape, waypointsBefore[waypointsBefore.length-1])) {
|
|
41291
|
+
if (waypointsBefore.length === 1 || !isPointInsideBBox(shape, waypointsBefore[waypointsBefore.length-1])) {
|
|
41284
41292
|
waypointsBefore.push(copy(dockingPoint));
|
|
41285
41293
|
}
|
|
41286
41294
|
|
|
41287
41295
|
// if first waypointAfter is inside shape's bounds, ignore docking point
|
|
41288
|
-
if (!isPointInsideBBox(shape, waypointsAfter[0])) {
|
|
41296
|
+
if (waypointsAfter.length === 1 || !isPointInsideBBox(shape, waypointsAfter[0])) {
|
|
41289
41297
|
waypointsAfter.unshift(copy(dockingPoint));
|
|
41290
41298
|
}
|
|
41291
41299
|
}
|
|
@@ -44052,7 +44060,9 @@
|
|
|
44052
44060
|
var rootElement = canvas.getRootElement(),
|
|
44053
44061
|
rootElementBo = rootElement.businessObject;
|
|
44054
44062
|
|
|
44055
|
-
|
|
44063
|
+
if (is$1(rootElement, 'bpmn:Collaboration')) {
|
|
44064
|
+
moddle.ids.unclaim(rootElementBo.id);
|
|
44065
|
+
}
|
|
44056
44066
|
});
|
|
44057
44067
|
}
|
|
44058
44068
|
|
|
@@ -48000,6 +48010,10 @@
|
|
|
48000
48010
|
};
|
|
48001
48011
|
|
|
48002
48012
|
BpmnFactory.prototype._ensureId = function(element) {
|
|
48013
|
+
if (element.id) {
|
|
48014
|
+
this._model.ids.claim(element.id, element);
|
|
48015
|
+
return;
|
|
48016
|
+
}
|
|
48003
48017
|
|
|
48004
48018
|
// generate semantic ids for elements
|
|
48005
48019
|
// bpmn:SequenceFlow -> SequenceFlow_ID
|
|
@@ -48070,7 +48084,8 @@
|
|
|
48070
48084
|
|
|
48071
48085
|
BpmnFactory.prototype.createDiEdge = function(semantic, waypoints, attrs) {
|
|
48072
48086
|
return this.create('bpmndi:BPMNEdge', assign({
|
|
48073
|
-
bpmnElement: semantic
|
|
48087
|
+
bpmnElement: semantic,
|
|
48088
|
+
waypoint: this.createDiWaypoints(waypoints)
|
|
48074
48089
|
}, attrs));
|
|
48075
48090
|
};
|
|
48076
48091
|
|
|
@@ -52255,12 +52270,26 @@
|
|
|
52255
52270
|
// TODO @barmac: remove once we drop bpmn.io properties
|
|
52256
52271
|
ensureLegacySupport(assignedDi);
|
|
52257
52272
|
|
|
52258
|
-
|
|
52259
|
-
|
|
52260
|
-
|
|
52261
|
-
|
|
52262
|
-
|
|
52263
|
-
|
|
52273
|
+
if (element.labelTarget) {
|
|
52274
|
+
|
|
52275
|
+
// set label colors as bpmndi:BPMNLabel#color
|
|
52276
|
+
self._commandStack.execute('element.updateModdleProperties', {
|
|
52277
|
+
element: element,
|
|
52278
|
+
moddleElement: element.businessObject.di.label,
|
|
52279
|
+
properties: {
|
|
52280
|
+
color: di['background-color']
|
|
52281
|
+
}
|
|
52282
|
+
});
|
|
52283
|
+
} else {
|
|
52284
|
+
|
|
52285
|
+
// set colors bpmndi:BPMNEdge or bpmndi:BPMNShape
|
|
52286
|
+
self._commandStack.execute('element.updateProperties', {
|
|
52287
|
+
element: element,
|
|
52288
|
+
properties: {
|
|
52289
|
+
di: assignedDi
|
|
52290
|
+
}
|
|
52291
|
+
});
|
|
52292
|
+
}
|
|
52264
52293
|
});
|
|
52265
52294
|
|
|
52266
52295
|
};
|
|
@@ -54370,7 +54399,9 @@
|
|
|
54370
54399
|
ENTRY_SELECTOR = '.entry',
|
|
54371
54400
|
ELEMENT_SELECTOR = TOGGLE_SELECTOR + ', ' + ENTRY_SELECTOR;
|
|
54372
54401
|
|
|
54373
|
-
var
|
|
54402
|
+
var PALETTE_PREFIX = 'djs-palette-',
|
|
54403
|
+
PALETTE_SHOWN_CLS = 'shown',
|
|
54404
|
+
PALETTE_OPEN_CLS = 'open',
|
|
54374
54405
|
PALETTE_TWO_COLUMN_CLS = 'two-column';
|
|
54375
54406
|
|
|
54376
54407
|
var DEFAULT_PRIORITY = 1000;
|
|
@@ -54488,6 +54519,7 @@
|
|
|
54488
54519
|
var container = this._container = domify(Palette.HTML_MARKUP);
|
|
54489
54520
|
|
|
54490
54521
|
parentContainer.appendChild(container);
|
|
54522
|
+
classes$1(parentContainer).add(PALETTE_PREFIX + PALETTE_SHOWN_CLS);
|
|
54491
54523
|
|
|
54492
54524
|
delegate.bind(container, ELEMENT_SELECTOR, 'click', function(event) {
|
|
54493
54525
|
|
|
@@ -54545,7 +54577,8 @@
|
|
|
54545
54577
|
|
|
54546
54578
|
var twoColumn;
|
|
54547
54579
|
|
|
54548
|
-
var cls = classes$1(container)
|
|
54580
|
+
var cls = classes$1(container),
|
|
54581
|
+
parentCls = classes$1(parent);
|
|
54549
54582
|
|
|
54550
54583
|
if ('twoColumn' in state) {
|
|
54551
54584
|
twoColumn = state.twoColumn;
|
|
@@ -54555,9 +54588,11 @@
|
|
|
54555
54588
|
|
|
54556
54589
|
// always update two column
|
|
54557
54590
|
cls.toggle(PALETTE_TWO_COLUMN_CLS, twoColumn);
|
|
54591
|
+
parentCls.toggle(PALETTE_PREFIX + PALETTE_TWO_COLUMN_CLS, twoColumn);
|
|
54558
54592
|
|
|
54559
54593
|
if ('open' in state) {
|
|
54560
54594
|
cls.toggle(PALETTE_OPEN_CLS, state.open);
|
|
54595
|
+
parentCls.toggle(PALETTE_PREFIX + PALETTE_OPEN_CLS, state.open);
|
|
54561
54596
|
}
|
|
54562
54597
|
|
|
54563
54598
|
eventBus.fire('palette.changed', {
|
|
@@ -55464,7 +55499,7 @@
|
|
|
55464
55499
|
|
|
55465
55500
|
create.start(event, [ subProcess, startEvent ], {
|
|
55466
55501
|
hints: {
|
|
55467
|
-
autoSelect: [
|
|
55502
|
+
autoSelect: [ subProcess ]
|
|
55468
55503
|
}
|
|
55469
55504
|
});
|
|
55470
55505
|
}
|