bpmn-js 18.31.0 → 18.31.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/README.md +1 -1
- package/dist/bpmn-modeler.development.js +29 -9
- package/dist/bpmn-modeler.production.min.js +3 -3
- package/dist/bpmn-navigated-viewer.development.js +15 -4
- package/dist/bpmn-navigated-viewer.production.min.js +2 -2
- package/dist/bpmn-viewer.development.js +15 -4
- package/dist/bpmn-viewer.production.min.js +2 -2
- package/lib/features/snapping/BpmnCreateMoveSnapping.js +14 -5
- package/lib/import/BpmnImporter.js +12 -1
- package/lib/util/LabelUtil.js +1 -1
- package/package.json +3 -3
|
@@ -181,12 +181,21 @@ BpmnCreateMoveSnapping.prototype.addSnapTargetPoints = function(snapPoints, shap
|
|
|
181
181
|
* @return {Shape[]}
|
|
182
182
|
*/
|
|
183
183
|
BpmnCreateMoveSnapping.prototype.getSnapTargets = function(shape, target) {
|
|
184
|
-
|
|
185
|
-
.filter(function(snapTarget) {
|
|
184
|
+
var snapTargets = CreateMoveSnapping.prototype.getSnapTargets.call(this, shape, target);
|
|
186
185
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
if (shape.labelTarget && shape.labelTarget.parent && shape.labelTarget.parent !== target) {
|
|
187
|
+
|
|
188
|
+
// labels stay at root, so include their target's peers
|
|
189
|
+
snapTargets = snapTargets.concat(
|
|
190
|
+
CreateMoveSnapping.prototype.getSnapTargets.call(this, shape, shape.labelTarget.parent)
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return snapTargets.filter(function(snapTarget, index) {
|
|
195
|
+
|
|
196
|
+
// do not snap to lanes
|
|
197
|
+
return !is(snapTarget, 'bpmn:Lane') && snapTargets.indexOf(snapTarget) === index;
|
|
198
|
+
});
|
|
190
199
|
};
|
|
191
200
|
|
|
192
201
|
// helpers //////////
|
|
@@ -269,7 +269,18 @@ BpmnImporter.prototype.addLabel = function(semantic, di, element) {
|
|
|
269
269
|
|
|
270
270
|
text = getLabel(element);
|
|
271
271
|
|
|
272
|
-
if (text) {
|
|
272
|
+
if (text && di.label && di.label.bounds && bounds.width > 0) {
|
|
273
|
+
|
|
274
|
+
// keep the persisted width, it may have been set by the user
|
|
275
|
+
var dimensions = this._textRenderer.getDimensions(text, {
|
|
276
|
+
box: bounds,
|
|
277
|
+
style: this._textRenderer.getExternalStyle()
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
bounds = assign({}, bounds, {
|
|
281
|
+
height: Math.ceil(dimensions.height)
|
|
282
|
+
});
|
|
283
|
+
} else if (text) {
|
|
273
284
|
|
|
274
285
|
// get corrected bounds from actual layouted text
|
|
275
286
|
bounds = this._textRenderer.getExternalLabelBounds(bounds, text);
|
package/lib/util/LabelUtil.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmn-js",
|
|
3
|
-
"version": "18.31.
|
|
3
|
+
"version": "18.31.1",
|
|
4
4
|
"description": "A bpmn 2.0 toolkit and web modeler",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"chai-match": "^1.1.1",
|
|
83
83
|
"cpy": "^13.2.3",
|
|
84
84
|
"cross-env": "^10.1.0",
|
|
85
|
-
"del": "^
|
|
86
|
-
"del-cli": "^
|
|
85
|
+
"del": "^9.0.0",
|
|
86
|
+
"del-cli": "^8.0.0",
|
|
87
87
|
"eslint": "^9.39.5",
|
|
88
88
|
"eslint-plugin-bpmn-io": "^2.4.0",
|
|
89
89
|
"execa": "^10.0.1",
|