html2canvas-pro 2.3.6 → 2.3.7

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
- * html2canvas-pro 2.3.6 <https://yorickshan.github.io/html2canvas-pro/>
2
+ * html2canvas-pro 2.3.7 <https://yorickshan.github.io/html2canvas-pro/>
3
3
  * Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
4
4
  * Released under MIT License
5
5
  */
@@ -7452,7 +7452,12 @@
7452
7452
  this.bounds = parseBounds(this.context, element);
7453
7453
  if (element.tagName === "FIELDSET") {
7454
7454
  const legend = element.querySelector(":scope > legend");
7455
- if (legend) this.legendBounds = parseBounds(this.context, legend);
7455
+ if (legend) {
7456
+ const legendBounds = parseBounds(this.context, legend);
7457
+ this.legendBounds = legendBounds;
7458
+ const borderBoxTop = legendBounds.top + legendBounds.height / 2 - this.styles.borderTopWidth / 2;
7459
+ this.bounds = new Bounds(this.bounds.left, borderBoxTop, this.bounds.width, this.bounds.height - (borderBoxTop - this.bounds.top));
7460
+ }
7456
7461
  }
7457
7462
  if (isDebugging(element, 4)) this.debugRender = true;
7458
7463
  }