victory 36.6.10 → 36.6.11
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 +2 -0
- package/dist/victory.js +7 -6
- package/dist/victory.min.js +1 -1
- package/package.json +28 -28
package/CHANGELOG.md
CHANGED
package/dist/victory.js
CHANGED
|
@@ -26510,6 +26510,9 @@ var _approximateDimensionsInternal = function (text, style) {
|
|
|
26510
26510
|
var _getMeasurementContainer = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
|
26511
26511
|
var element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
26512
26512
|
element.setAttribute("xlink", "http://www.w3.org/1999/xlink");
|
|
26513
|
+
element.setAttribute("width", "300");
|
|
26514
|
+
element.setAttribute("height", "300");
|
|
26515
|
+
element.setAttribute("viewBox", "0 0 300 300");
|
|
26513
26516
|
var containerElement = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
26514
26517
|
element.appendChild(containerElement);
|
|
26515
26518
|
element.style.position = "fixed";
|
|
@@ -26544,7 +26547,6 @@ var _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___def
|
|
|
26544
26547
|
var params = _prepareParams(style, i);
|
|
26545
26548
|
|
|
26546
26549
|
textElement.style.fontFamily = params.fontFamily;
|
|
26547
|
-
textElement.style.transform = "rotate(".concat(params.angle, ")");
|
|
26548
26550
|
textElement.style.fontSize = "".concat(params.fontSize, "px");
|
|
26549
26551
|
textElement.style.lineHeight = params.lineHeight;
|
|
26550
26552
|
textElement.style.fontFamily = params.fontFamily;
|
|
@@ -26552,18 +26554,17 @@ var _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_0___def
|
|
|
26552
26554
|
textElement.textContent = line;
|
|
26553
26555
|
textElement.setAttribute("x", "0");
|
|
26554
26556
|
textElement.setAttribute("y", "".concat(heightAcc));
|
|
26555
|
-
heightAcc += params.lineHeight * params.fontSize;
|
|
26556
26557
|
containerElement.appendChild(textElement);
|
|
26558
|
+
heightAcc += params.lineHeight * textElement.getBoundingClientRect().height;
|
|
26557
26559
|
}
|
|
26558
26560
|
|
|
26559
26561
|
var _containerElement$get = containerElement.getBoundingClientRect(),
|
|
26560
|
-
width = _containerElement$get.width
|
|
26561
|
-
height = _containerElement$get.height;
|
|
26562
|
+
width = _containerElement$get.width;
|
|
26562
26563
|
|
|
26563
26564
|
containerElement.innerHTML = "";
|
|
26564
26565
|
return {
|
|
26565
|
-
width: width,
|
|
26566
|
-
height:
|
|
26566
|
+
width: style !== null && style !== void 0 && style.angle ? _getSizeWithRotate(width, heightAcc, style === null || style === void 0 ? void 0 : style.angle) : width,
|
|
26567
|
+
height: style !== null && style !== void 0 && style.angle ? _getSizeWithRotate(heightAcc, width, style === null || style === void 0 ? void 0 : style.angle) : heightAcc
|
|
26567
26568
|
};
|
|
26568
26569
|
}, function (text, style) {
|
|
26569
26570
|
var totalText = Array.isArray(text) ? text.join() : text;
|