bpmn-js 15.1.0 → 15.1.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-modeler v15.1.0
2
+ * bpmn-js - bpmn-modeler v15.1.2
3
3
  *
4
4
  * Copyright (c) 2014-present, camunda Services GmbH
5
5
  *
@@ -22679,6 +22679,19 @@
22679
22679
  }
22680
22680
  });
22681
22681
 
22682
+ eventBus.on([ 'connection.added', 'connection.changed' ], function(event) {
22683
+ var element = event.element,
22684
+ gfx = event.gfx;
22685
+
22686
+ var outline = query('.djs-outline', gfx);
22687
+
22688
+ if (!outline) {
22689
+ outline = createOutline(gfx, element);
22690
+ append(gfx, outline);
22691
+ }
22692
+
22693
+ self.updateConnectionOutline(outline, element);
22694
+ });
22682
22695
  }
22683
22696
 
22684
22697
 
@@ -22710,6 +22723,25 @@
22710
22723
  }
22711
22724
  };
22712
22725
 
22726
+ /**
22727
+ * Updates the outline of a connection respecting the bounding box of
22728
+ * the connection and an outline offset.
22729
+ * Register an outline provider with the given priority.
22730
+ *
22731
+ * @param {SVGElement} outline
22732
+ * @param {Element} connection
22733
+ **/
22734
+ Outline.prototype.updateConnectionOutline = function(outline, connection) {
22735
+ var bbox = getBBox(connection);
22736
+
22737
+ attr(outline, {
22738
+ x: bbox.x - this.offset,
22739
+ y: bbox.y - this.offset,
22740
+ width: bbox.width + this.offset * 2,
22741
+ height: bbox.height + this.offset * 2
22742
+ });
22743
+ };
22744
+
22713
22745
  /**
22714
22746
  * Register an outline provider with the given priority.
22715
22747
  *
@@ -63438,6 +63470,10 @@
63438
63470
  */
63439
63471
  OutlineProvider.prototype.updateOutline = function(element, outline) {
63440
63472
 
63473
+ if (isLabel(element)) {
63474
+ return;
63475
+ }
63476
+
63441
63477
  if (isAny(element, [ 'bpmn:SubProcess', 'bpmn:Group' ])) {
63442
63478
 
63443
63479
  attr(outline, {