bpmn-js 18.12.1 → 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.12.1
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-02
11
+ * Date: 2026-03-06
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -41745,7 +41745,7 @@
41745
41745
  return canAttach(element, element.host, null, position);
41746
41746
  }
41747
41747
 
41748
- return canCreate(element, target, null);
41748
+ return canCreate(element, target);
41749
41749
  });
41750
41750
  });
41751
41751
 
@@ -41863,10 +41863,6 @@
41863
41863
  return !element || isLabel(element);
41864
41864
  }
41865
41865
 
41866
- function isSame$1(a, b) {
41867
- return a === b;
41868
- }
41869
-
41870
41866
  /**
41871
41867
  * @param {Element} element
41872
41868
  *
@@ -42559,16 +42555,6 @@
42559
42555
  return true;
42560
42556
  }
42561
42557
 
42562
- if (isSame$1(source, target)) {
42563
- return false;
42564
- }
42565
-
42566
- // ensure we do not drop the element
42567
- // into source
42568
- if (source && isParent(source, target)) {
42569
- return false;
42570
- }
42571
-
42572
42558
  return canDrop(shape, target) || canInsert(shape, target);
42573
42559
  }
42574
42560
 
@@ -54727,17 +54713,34 @@
54727
54713
  }
54728
54714
  }
54729
54715
 
54730
- // attached to either top-right, top-left, bottom-right or bottom-left corner
54731
- // 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
+
54732
54735
 
54733
54736
  if (isHorizontal) {
54734
- if (isSame(getVerticalOrientation(attachOrientation), getVerticalOrientation(targetOrientation))) {
54737
+ if (isSame(verticalAttachOrientation, verticalTargetOrientation)) {
54735
54738
  return 'h';
54736
54739
  } else {
54737
54740
  return 'v';
54738
54741
  }
54739
54742
  } else {
54740
- if (isSame(getHorizontalOrientation(attachOrientation), getHorizontalOrientation(targetOrientation))) {
54743
+ if (isSame(horizontalAttachOrientation, horizontalTargetOrientation)) {
54741
54744
  return 'v';
54742
54745
  } else {
54743
54746
  return 'h';