@hpcc-js/common 2.71.12 → 2.71.14
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/dist/index.es6.js +13 -7
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +17 -17
- package/src/Utility.ts +10 -4
- package/src/__package__.ts +2 -2
- package/types/Utility.d.ts.map +1 -1
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { classID2Meta, hashSum, isArray } from '@hpcc-js/util';
|
|
2
2
|
|
|
3
3
|
var PKG_NAME = "@hpcc-js/common";
|
|
4
|
-
var PKG_VERSION = "2.71.
|
|
5
|
-
var BUILD_VERSION = "2.104.
|
|
4
|
+
var PKG_VERSION = "2.71.14";
|
|
5
|
+
var BUILD_VERSION = "2.104.35";
|
|
6
6
|
|
|
7
7
|
/******************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -7617,11 +7617,17 @@ function textSize(_text, fontName, fontSize, bold) {
|
|
|
7617
7617
|
var hash = "".concat(bold, "::").concat(fontSize, "::").concat(fontName, "::").concat(text.join("::"));
|
|
7618
7618
|
var retVal = g_fontSizeContextCache[hash];
|
|
7619
7619
|
if (!retVal) {
|
|
7620
|
+
retVal = { width: 0, height: 0 };
|
|
7620
7621
|
g_fontSizeContext.font = "".concat(bold ? "bold " : "").concat(fontSize, "px ").concat(fontName);
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7622
|
+
text.forEach(function (line) {
|
|
7623
|
+
var textMeasurement = g_fontSizeContext.measureText("" + line);
|
|
7624
|
+
var width = textMeasurement.width;
|
|
7625
|
+
var height = (textMeasurement.fontBoundingBoxDescent + textMeasurement.fontBoundingBoxAscent) * text.length;
|
|
7626
|
+
g_fontSizeContextCache[hash] = retVal = {
|
|
7627
|
+
width: width > retVal.width ? width : retVal.width,
|
|
7628
|
+
height: height > retVal.height ? height : retVal.height
|
|
7629
|
+
};
|
|
7630
|
+
});
|
|
7625
7631
|
}
|
|
7626
7632
|
return retVal;
|
|
7627
7633
|
}
|
|
@@ -10571,7 +10577,7 @@ var Text = /** @class */ (function (_super) {
|
|
|
10571
10577
|
var width = Math.max.apply(Math, widths);
|
|
10572
10578
|
var retVal = {
|
|
10573
10579
|
x: -width / 2,
|
|
10574
|
-
y: -height / 2 - lineHeight / (this.fontFamily() === "FontAwesome" ? 4 : 6),
|
|
10580
|
+
y: -height / 2 - lineHeight / (this.fontFamily() === "FontAwesome" ? 4 : 6), // baseLine offset
|
|
10575
10581
|
width: width,
|
|
10576
10582
|
height: height
|
|
10577
10583
|
};
|