victory-area 36.6.10 → 36.6.12

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
@@ -1,5 +1,9 @@
1
1
  # victory-area
2
2
 
3
+ ## 36.6.12
4
+
5
+ ## 36.6.11
6
+
3
7
  ## 36.6.10
4
8
 
5
9
  ### Patch Changes
@@ -14179,6 +14179,10 @@ var _approximateDimensionsInternal = function (text, style) {
14179
14179
  var _getMeasurementContainer = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___default()(function () {
14180
14180
  var element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
14181
14181
  element.setAttribute("xlink", "http://www.w3.org/1999/xlink");
14182
+ element.setAttribute("width", "300");
14183
+ element.setAttribute("height", "300");
14184
+ element.setAttribute("viewBox", "0 0 300 300");
14185
+ element.setAttribute("aria-hidden", "true");
14182
14186
  var containerElement = document.createElementNS("http://www.w3.org/2000/svg", "text");
14183
14187
  element.appendChild(containerElement);
14184
14188
  element.style.position = "fixed";
@@ -14213,7 +14217,6 @@ var _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___def
14213
14217
  var params = _prepareParams(style, i);
14214
14218
 
14215
14219
  textElement.style.fontFamily = params.fontFamily;
14216
- textElement.style.transform = "rotate(".concat(params.angle, ")");
14217
14220
  textElement.style.fontSize = "".concat(params.fontSize, "px");
14218
14221
  textElement.style.lineHeight = params.lineHeight;
14219
14222
  textElement.style.fontFamily = params.fontFamily;
@@ -14221,18 +14224,17 @@ var _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___def
14221
14224
  textElement.textContent = line;
14222
14225
  textElement.setAttribute("x", "0");
14223
14226
  textElement.setAttribute("y", "".concat(heightAcc));
14224
- heightAcc += params.lineHeight * params.fontSize;
14225
14227
  containerElement.appendChild(textElement);
14228
+ heightAcc += params.lineHeight * textElement.getBoundingClientRect().height;
14226
14229
  }
14227
14230
 
14228
14231
  var _containerElement$get = containerElement.getBoundingClientRect(),
14229
- width = _containerElement$get.width,
14230
- height = _containerElement$get.height;
14232
+ width = _containerElement$get.width;
14231
14233
 
14232
14234
  containerElement.innerHTML = "";
14233
14235
  return {
14234
- width: width,
14235
- height: height
14236
+ width: style !== null && style !== void 0 && style.angle ? _getSizeWithRotate(width, heightAcc, style === null || style === void 0 ? void 0 : style.angle) : width,
14237
+ height: style !== null && style !== void 0 && style.angle ? _getSizeWithRotate(heightAcc, width, style === null || style === void 0 ? void 0 : style.angle) : heightAcc
14236
14238
  };
14237
14239
  }, function (text, style) {
14238
14240
  var totalText = Array.isArray(text) ? text.join() : text;