bpmn-js 18.3.0 → 18.3.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v18.3.0
2
+ * bpmn-js - bpmn-modeler v18.3.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: 2025-02-18
11
+ * Date: 2025-02-21
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -46238,6 +46238,7 @@
46238
46238
 
46239
46239
  /**
46240
46240
  * @typedef {import('didi').Injector} Injector
46241
+ * @typedef {import('diagram-js/lib/core/Canvas').default} Canvas
46241
46242
  *
46242
46243
  * @typedef {import('../../model/Types').Shape} Shape
46243
46244
  *
@@ -46247,13 +46248,17 @@
46247
46248
 
46248
46249
  /**
46249
46250
  * @param {Injector} injector
46251
+ * @param {Canvas} canvas
46250
46252
  */
46251
- function BpmnSpaceTool(injector) {
46253
+ function BpmnSpaceTool(injector, canvas) {
46252
46254
  injector.invoke(SpaceTool, this);
46255
+
46256
+ this._canvas = canvas;
46253
46257
  }
46254
46258
 
46255
46259
  BpmnSpaceTool.$inject = [
46256
- 'injector'
46260
+ 'injector',
46261
+ 'canvas'
46257
46262
  ];
46258
46263
 
46259
46264
  e$2(BpmnSpaceTool, SpaceTool);
@@ -46267,7 +46272,26 @@
46267
46272
  * @return {Object}
46268
46273
  */
46269
46274
  BpmnSpaceTool.prototype.calculateAdjustments = function(elements, axis, delta, start) {
46270
- var adjustments = SpaceTool.prototype.calculateAdjustments.call(this, elements, axis, delta, start);
46275
+
46276
+ var canvasRoot = this._canvas.getRootElement(),
46277
+ spaceRoot = elements[0] === canvasRoot ? null : elements[0],
46278
+ enclosedArtifacts = [];
46279
+
46280
+ // ensure
46281
+ if (spaceRoot) {
46282
+ enclosedArtifacts = values(
46283
+ getEnclosedElements(
46284
+ canvasRoot.children.filter(
46285
+ (child) => is$1(child, 'bpmn:Artifact')
46286
+ ),
46287
+ getBBox(spaceRoot)
46288
+ )
46289
+ );
46290
+ }
46291
+
46292
+ const elementsToMove = [ ...elements, ...enclosedArtifacts ];
46293
+
46294
+ var adjustments = SpaceTool.prototype.calculateAdjustments.call(this, elementsToMove, axis, delta, start);
46271
46295
 
46272
46296
  // do not resize:
46273
46297
  //