bpmn-js 17.9.0 → 17.9.2

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.
@@ -10,6 +10,7 @@ import {
10
10
 
11
11
  import {
12
12
  is,
13
+ getDi,
13
14
  getBusinessObject
14
15
  } from '../../util/ModelUtil';
15
16
 
@@ -19,7 +20,8 @@ import {
19
20
 
20
21
  import {
21
22
  isExpanded,
22
- isEventSubProcess
23
+ isEventSubProcess,
24
+ isHorizontal
23
25
  } from '../../util/DiUtil';
24
26
 
25
27
  import { getPropertyNames } from '../copy-paste/ModdleCopy';
@@ -284,9 +286,16 @@ export default function BpmnReplace(
284
286
  hints.moveChildren = false;
285
287
  }
286
288
 
287
- // apply same width and default height
288
- newElement.width = element.width;
289
- newElement.height = elementFactory.getDefaultSize(newElement).height;
289
+ // apply same directionality
290
+ var isHorizontalPool = isHorizontal(element);
291
+ if (!getDi(element).isHorizontal) {
292
+ getDi(newElement).isHorizontal = isHorizontalPool;
293
+ }
294
+
295
+ // keep the existing size of the pool's direction to
296
+ // prevent dangling message flows
297
+ newElement.width = isHorizontalPool ? element.width : elementFactory.getDefaultSize(newElement).width;
298
+ newElement.height = isHorizontalPool ? elementFactory.getDefaultSize(newElement).height : element.height;
290
299
  }
291
300
 
292
301
  if (!rules.allowed('shape.resize', { shape: newBusinessObject })) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmn-js",
3
- "version": "17.9.0",
3
+ "version": "17.9.2",
4
4
  "description": "A bpmn 2.0 toolkit and web modeler",
5
5
  "main": "index.js",
6
6
  "files": [