bpmn-js 8.8.3 → 8.9.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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * bpmn-js - bpmn-navigated-viewer v8.8.3
2
+ * bpmn-js - bpmn-navigated-viewer v8.9.0
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: 2021-12-03
11
+ * Date: 2022-01-14
12
12
  */
13
13
  (function (global, factory) {
14
14
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -8845,13 +8845,17 @@
8845
8845
  * Scrolls the viewbox to contain the given element.
8846
8846
  * Optionally specify a padding to be applied to the edges.
8847
8847
  *
8848
- * @param {Object} [element] the element to scroll to.
8848
+ * @param {Object|String} [element] the element to scroll to.
8849
8849
  * @param {Object|Number} [padding=100] the padding to be applied. Can also specify top, bottom, left and right.
8850
8850
  *
8851
8851
  */
8852
8852
  Canvas.prototype.scrollToElement = function(element, padding) {
8853
8853
  var defaultPadding = 100;
8854
8854
 
8855
+ if (typeof element === 'string') {
8856
+ element = this._elementRegistry.get(element);
8857
+ }
8858
+
8855
8859
  // switch to correct Plane
8856
8860
  var targetPlane = this.findPlane(element);
8857
8861
  if (targetPlane !== this._activePlane) {