camunda-bpmn-js 5.14.1 → 5.15.0

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.
@@ -809,6 +809,17 @@
809
809
  return isObject(value) && has$2(value, 'waypoints');
810
810
  }
811
811
 
812
+ /**
813
+ * Checks whether a value is an instance of Label.
814
+ *
815
+ * @param {any} value
816
+ *
817
+ * @return {boolean}
818
+ */
819
+ function isLabel(value) {
820
+ return isObject(value) && has$2(value, 'labelTarget');
821
+ }
822
+
812
823
  /**
813
824
  * @typedef {import('diagram-js/lib/util/Types').Point} Point
814
825
  * @typedef {import('diagram-js/lib/util/Types').Rect} Rect
@@ -1924,11 +1935,11 @@
1924
1935
  [ 'l', width - borderRadius * 2, 0 ],
1925
1936
  [ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, borderRadius ],
1926
1937
  [ 'l', 0, height - borderRadius * 2 ],
1927
- [ 'a', borderRadius, borderRadius, 0, 0, 1, -10, borderRadius ],
1938
+ [ 'a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, borderRadius ],
1928
1939
  [ 'l', borderRadius * 2 - width, 0 ],
1929
- [ 'a', borderRadius, borderRadius, 0, 0, 1, -10, -10 ],
1940
+ [ 'a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, -borderRadius ],
1930
1941
  [ 'l', 0, borderRadius * 2 - height ],
1931
- [ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -10 ],
1942
+ [ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -borderRadius ],
1932
1943
  [ 'z' ]
1933
1944
  ];
1934
1945
 
@@ -2725,7 +2736,8 @@
2725
2736
  var ELEMENT_LABEL_DISTANCE = 10,
2726
2737
  INNER_OUTER_DIST = 3,
2727
2738
  PARTICIPANT_STROKE_WIDTH = 1.5,
2728
- TASK_BORDER_RADIUS = 10;
2739
+ TASK_BORDER_RADIUS = 10,
2740
+ EXTERNAL_LABEL_BORDER_RADIUS = 4;
2729
2741
 
2730
2742
  var DEFAULT_OPACITY = 0.95,
2731
2743
  FULL_OPACITY = 1,
@@ -5034,6 +5046,11 @@
5034
5046
  * @return {string} path
5035
5047
  */
5036
5048
  BpmnRenderer.prototype.getShapePath = function(shape) {
5049
+
5050
+ if (isLabel(shape)) {
5051
+ return getRoundRectPath(shape, EXTERNAL_LABEL_BORDER_RADIUS);
5052
+ }
5053
+
5037
5054
  if (is$1(shape, 'bpmn:Event')) {
5038
5055
  return getCirclePath(shape);
5039
5056
  }