@hpcc-js/common 2.71.12 → 2.71.13
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 +12 -6
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +12 -6
- 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 +2 -2
- 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.js
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
})(this, (function (exports, util) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/common";
|
|
8
|
-
var PKG_VERSION = "2.71.
|
|
9
|
-
var BUILD_VERSION = "2.104.
|
|
8
|
+
var PKG_VERSION = "2.71.13";
|
|
9
|
+
var BUILD_VERSION = "2.104.32";
|
|
10
10
|
|
|
11
11
|
/******************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -7621,11 +7621,17 @@
|
|
|
7621
7621
|
var hash = "".concat(bold, "::").concat(fontSize, "::").concat(fontName, "::").concat(text.join("::"));
|
|
7622
7622
|
var retVal = g_fontSizeContextCache[hash];
|
|
7623
7623
|
if (!retVal) {
|
|
7624
|
+
retVal = { width: 0, height: 0 };
|
|
7624
7625
|
g_fontSizeContext.font = "".concat(bold ? "bold " : "").concat(fontSize, "px ").concat(fontName);
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7626
|
+
text.forEach(function (line) {
|
|
7627
|
+
var textMeasurement = g_fontSizeContext.measureText("" + line);
|
|
7628
|
+
var width = textMeasurement.width;
|
|
7629
|
+
var height = (textMeasurement.fontBoundingBoxDescent + textMeasurement.fontBoundingBoxAscent) * text.length;
|
|
7630
|
+
g_fontSizeContextCache[hash] = retVal = {
|
|
7631
|
+
width: width > retVal.width ? width : retVal.width,
|
|
7632
|
+
height: height > retVal.height ? height : retVal.height
|
|
7633
|
+
};
|
|
7634
|
+
});
|
|
7629
7635
|
}
|
|
7630
7636
|
return retVal;
|
|
7631
7637
|
}
|