bpmn-js 18.31.0 → 18.31.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-viewer v18.31.0
2
+ * bpmn-js - bpmn-viewer v18.31.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-10-01
11
+ * Date: 2026-10-21
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -967,7 +967,7 @@
967
967
  bounds = label.bounds;
968
968
 
969
969
  size = {
970
- width: Math.max(DEFAULT_LABEL_SIZE$1.width, bounds.width),
970
+ width: bounds.width,
971
971
  height: bounds.height
972
972
  };
973
973
 
@@ -6697,7 +6697,18 @@
6697
6697
 
6698
6698
  text = getLabel(element);
6699
6699
 
6700
- if (text) {
6700
+ if (text && di.label && di.label.bounds && bounds.width > 0) {
6701
+
6702
+ // keep the persisted width, it may have been set by the user
6703
+ var dimensions = this._textRenderer.getDimensions(text, {
6704
+ box: bounds,
6705
+ style: this._textRenderer.getExternalStyle()
6706
+ });
6707
+
6708
+ bounds = assign$1({}, bounds, {
6709
+ height: Math.ceil(dimensions.height)
6710
+ });
6711
+ } else if (text) {
6701
6712
 
6702
6713
  // get corrected bounds from actual layouted text
6703
6714
  bounds = this._textRenderer.getExternalLabelBounds(bounds, text);