bpmn-js 8.8.2 → 8.8.3
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 +6 -0
- package/dist/assets/diagram-js.css +2 -0
- package/dist/bpmn-modeler.development.js +38 -29
- package/dist/bpmn-modeler.production.min.js +5 -5
- package/dist/bpmn-navigated-viewer.development.js +36 -27
- package/dist/bpmn-navigated-viewer.production.min.js +2 -2
- package/dist/bpmn-viewer.development.js +36 -27
- package/dist/bpmn-viewer.production.min.js +2 -2
- package/lib/features/modeling/behavior/DropOnFlowBehavior.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ All notable changes to [bpmn-js](https://github.com/bpmn-io/bpmn-js) are documen
|
|
|
6
6
|
|
|
7
7
|
___Note:__ Yet to be released changes appear here._
|
|
8
8
|
|
|
9
|
+
## 8.8.3
|
|
10
|
+
|
|
11
|
+
* `FIX`: correct resize handles hidden behind element ([#1520](https://github.com/bpmn-io/bpmn-js/issues/1520))
|
|
12
|
+
* `FIX`: handle close to source or target drop on flow ([#1541](https://github.com/bpmn-io/bpmn-js/issues/1541))
|
|
13
|
+
* `CHORE`: bump to `diagram-js@7.6.3`
|
|
14
|
+
|
|
9
15
|
## 8.8.2
|
|
10
16
|
|
|
11
17
|
* `FIX`: properly re-use ID of a copied element if available ([#1503](https://github.com/bpmn-io/bpmn-js/pull/1509))
|
|
@@ -468,6 +468,7 @@ marker.djs-dragger tspan {
|
|
|
468
468
|
*/
|
|
469
469
|
.djs-overlay-context-pad {
|
|
470
470
|
width: 72px;
|
|
471
|
+
z-index: 100;
|
|
471
472
|
}
|
|
472
473
|
|
|
473
474
|
.djs-context-pad {
|
|
@@ -750,6 +751,7 @@ marker.djs-dragger tspan {
|
|
|
750
751
|
width: 100%;
|
|
751
752
|
padding: 6px 10px;
|
|
752
753
|
border: 1px solid var(--search-input-border-color);
|
|
754
|
+
box-sizing: border-box;
|
|
753
755
|
}
|
|
754
756
|
|
|
755
757
|
.djs-search-input input:focus {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* bpmn-js - bpmn-modeler v8.8.
|
|
2
|
+
* bpmn-js - bpmn-modeler v8.8.3
|
|
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: 2021-
|
|
11
|
+
* Date: 2021-12-03
|
|
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
|
};
|
|
@@ -21491,22 +21496,26 @@
|
|
|
21491
21496
|
|
|
21492
21497
|
Overlays.prototype._updateOverlayVisibilty = function(overlay, viewbox) {
|
|
21493
21498
|
var show = overlay.show,
|
|
21499
|
+
plane = overlay.plane,
|
|
21494
21500
|
minZoom = show && show.minZoom,
|
|
21495
21501
|
maxZoom = show && show.maxZoom,
|
|
21496
21502
|
htmlContainer = overlay.htmlContainer,
|
|
21503
|
+
activePlane = this._canvas.getActivePlane(),
|
|
21497
21504
|
visible = true;
|
|
21498
21505
|
|
|
21499
|
-
if (
|
|
21506
|
+
if (plane !== activePlane) {
|
|
21507
|
+
visible = false;
|
|
21508
|
+
} else if (show) {
|
|
21500
21509
|
if (
|
|
21501
21510
|
(isDefined(minZoom) && minZoom > viewbox.scale) ||
|
|
21502
21511
|
(isDefined(maxZoom) && maxZoom < viewbox.scale)
|
|
21503
21512
|
) {
|
|
21504
21513
|
visible = false;
|
|
21505
21514
|
}
|
|
21506
|
-
|
|
21507
|
-
setVisible$1(htmlContainer, visible);
|
|
21508
21515
|
}
|
|
21509
21516
|
|
|
21517
|
+
setVisible$1(htmlContainer, visible);
|
|
21518
|
+
|
|
21510
21519
|
this._updateOverlayScale(overlay, viewbox);
|
|
21511
21520
|
};
|
|
21512
21521
|
|
|
@@ -41292,12 +41301,12 @@
|
|
|
41292
41301
|
dockingPoint = intersection.bendpoint ? waypoints[intersection.index] : mid;
|
|
41293
41302
|
|
|
41294
41303
|
// if last waypointBefore is inside shape's bounds, ignore docking point
|
|
41295
|
-
if (!isPointInsideBBox(shape, waypointsBefore[waypointsBefore.length-1])) {
|
|
41304
|
+
if (waypointsBefore.length === 1 || !isPointInsideBBox(shape, waypointsBefore[waypointsBefore.length-1])) {
|
|
41296
41305
|
waypointsBefore.push(copy(dockingPoint));
|
|
41297
41306
|
}
|
|
41298
41307
|
|
|
41299
41308
|
// if first waypointAfter is inside shape's bounds, ignore docking point
|
|
41300
|
-
if (!isPointInsideBBox(shape, waypointsAfter[0])) {
|
|
41309
|
+
if (waypointsAfter.length === 1 || !isPointInsideBBox(shape, waypointsAfter[0])) {
|
|
41301
41310
|
waypointsAfter.unshift(copy(dockingPoint));
|
|
41302
41311
|
}
|
|
41303
41312
|
}
|