bpmn-js 18.13.0 → 18.13.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.13.0
2
+ * bpmn-js - bpmn-modeler v18.13.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: 2026-03-04
11
+ * Date: 2026-03-06
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -54713,17 +54713,34 @@
54713
54713
  }
54714
54714
  }
54715
54715
 
54716
- // attached to either top-right, top-left, bottom-right or bottom-left corner
54717
- // and orientation is same on the counter-axis
54716
+ // attached to either top-right, top-left, bottom-right or bottom-left corner,
54717
+ // or strictly above/below or left/right of the target. In the corner case,
54718
+ // the orientation is compared on the counter-axis to decide the layout.
54719
+
54720
+ var verticalAttachOrientation = getVerticalOrientation(attachOrientation),
54721
+ horizontalAttachOrientation = getHorizontalOrientation(attachOrientation),
54722
+ verticalTargetOrientation = getVerticalOrientation(targetOrientation),
54723
+ horizontalTargetOrientation = getHorizontalOrientation(targetOrientation);
54724
+
54725
+ // If the target is strictly above/below (no horizontal orientation)
54726
+ if (verticalTargetOrientation && !horizontalTargetOrientation) {
54727
+ return 'v';
54728
+ }
54729
+
54730
+ // If the target is strictly left/right (no vertical orientation)
54731
+ if (horizontalTargetOrientation && !verticalTargetOrientation) {
54732
+ return 'h';
54733
+ }
54734
+
54718
54735
 
54719
54736
  if (isHorizontal) {
54720
- if (isSame(getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation))) {
54737
+ if (isSame(verticalAttachOrientation, verticalTargetOrientation)) {
54721
54738
  return 'h';
54722
54739
  } else {
54723
54740
  return 'v';
54724
54741
  }
54725
54742
  } else {
54726
- if (isSame(getHorizontalOrientation(attachOrientation), getHorizontalOrientation(targetOrientation))) {
54743
+ if (isSame(horizontalAttachOrientation, horizontalTargetOrientation)) {
54727
54744
  return 'v';
54728
54745
  } else {
54729
54746
  return 'h';