camunda-bpmn-js 3.1.2 → 3.2.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.
@@ -10301,9 +10301,9 @@
10301
10301
 
10302
10302
  const viewport = this._viewport = createGroup(svg, 'viewport');
10303
10303
 
10304
- // debounce canvas.viewbox.changed events
10305
- // for smoother diagram interaction
10306
- if (config.deferUpdate !== false) {
10304
+ // debounce canvas.viewbox.changed events when deferUpdate is set
10305
+ // to help with potential performance issues
10306
+ if (config.deferUpdate) {
10307
10307
  this._viewboxChanged = debounce(bind$2(this._viewboxChanged, this), 300);
10308
10308
  }
10309
10309
 
@@ -11327,6 +11327,11 @@
11327
11327
  this.setRootElement(rootElement);
11328
11328
  }
11329
11329
 
11330
+ // element is rootElement, do not change viewport
11331
+ if (rootElement === element) {
11332
+ return;
11333
+ }
11334
+
11330
11335
  if (!padding) {
11331
11336
  padding = {};
11332
11337
  }