bpmn-js 9.0.0-alpha.1 → 9.0.0-alpha.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ All notable changes to [bpmn-js](https://github.com/bpmn-io/bpmn-js) are documen
7
7
 
8
8
  ___Note:__ Yet to be released changes appear here._
9
9
 
10
+ ## 9.0.0-alpha.2
11
+
12
+ * `FIX`: use active plane for svg export ([#1592](https://github.com/bpmn-io/bpmn-js/issues/1592))
13
+ * `FIX`: prevent infinite loop on root property change ([#1593](https://github.com/bpmn-io/bpmn-js/pull/1593))
10
14
  ## 9.0.0-alpha.1
11
15
 
12
16
  * `FEAT`: support modeling of collapsed subprocesses ([#1443](https://github.com/bpmn-io/bpmn-js/issues/1443))
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v9.0.0-alpha.1
2
+ * bpmn-js - bpmn-modeler v9.0.0-alpha.2
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: 2022-02-04
11
+ * Date: 2022-02-09
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -16297,7 +16297,7 @@
16297
16297
  try {
16298
16298
  var canvas = self.get('canvas');
16299
16299
 
16300
- var contentNode = canvas.getDefaultLayer(),
16300
+ var contentNode = canvas.getActiveLayer(),
16301
16301
  defsNode = query('defs', canvas._svg);
16302
16302
 
16303
16303
  var contents = innerSVG(contentNode),
@@ -22377,19 +22377,6 @@
22377
22377
 
22378
22378
  var boParents = [];
22379
22379
 
22380
- // update primary shape if name or ID of the plane changes
22381
- eventBus.on('element.changed', function(e) {
22382
- var shape = e.element;
22383
-
22384
- if (!isPlane(shape)) {
22385
- return;
22386
- }
22387
-
22388
- var primary = elementRegistry.get(getShapeIdFromPlane(shape));
22389
-
22390
- primary && eventBus.fire('element.changed', { element: primary });
22391
- });
22392
-
22393
22380
  // update breadcrumbs if name or ID of the primary shape changes
22394
22381
  eventBus.on('element.changed', function(e) {
22395
22382
  var shape = e.element,
@@ -45089,6 +45076,27 @@
45089
45076
  elementRegistry.updateId(planeElement, toPlaneId(oldId));
45090
45077
  }, true);
45091
45078
 
45079
+ // re-throw element.changed to re-render primary shape if associated plane has
45080
+ // changed (e.g. bpmn:name property has changed)
45081
+ eventBus.on('element.changed', function(context) {
45082
+ var element = context.element;
45083
+
45084
+ if (!isPlane(element)) {
45085
+ return;
45086
+ }
45087
+
45088
+ var plane = element;
45089
+
45090
+ var primaryShape = elementRegistry.get(getShapeIdFromPlane(plane));
45091
+
45092
+ // do not re-throw if no associated primary shape (e.g. bpmn:Process)
45093
+ if (!primaryShape || primaryShape === plane) {
45094
+ return;
45095
+ }
45096
+
45097
+ eventBus.fire('element.changed', { element: primaryShape });
45098
+ });
45099
+
45092
45100
 
45093
45101
  // create/remove plane for the subprocess
45094
45102
  this.executed('shape.toggleCollapse', LOW_PRIORITY$9, function(context) {