@plannco-ppe/ppe-core 1.0.16 → 1.0.17
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.iife.js +1 -1
- package/dist/index.js +4 -4
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23914,22 +23914,22 @@ function Ug(n) {
|
|
|
23914
23914
|
function Ua(n, t, e) {
|
|
23915
23915
|
if ((e == null ? void 0 : e.enabled) === !1)
|
|
23916
23916
|
return n;
|
|
23917
|
-
const i = (e == null ? void 0 : e.baseZoom) ?? 0, s = (e == null ? void 0 : e.scaleFactor) ?? 1, r = (e == null ? void 0 : e.minFontSize) ??
|
|
23917
|
+
const i = (e == null ? void 0 : e.baseZoom) ?? 0, s = (e == null ? void 0 : e.scaleFactor) ?? 1, r = (e == null ? void 0 : e.minFontSize) ?? 1, o = (e == null ? void 0 : e.maxFontSize) ?? 32, a = (e == null ? void 0 : e.minPadding) ?? [0, 0, 0, 0], l = (e == null ? void 0 : e.maxPadding) ?? [8, 16, 8, 16], h = t - i, c = Math.pow(2, h * s);
|
|
23918
23918
|
let u = n.font || "12px Arial";
|
|
23919
23919
|
const d = u.match(/(\d+(?:\.\d+)?)(px|rem|em)/);
|
|
23920
23920
|
if (d) {
|
|
23921
23921
|
const m = parseFloat(d[1]), _ = d[2], y = Math.max(
|
|
23922
23922
|
r,
|
|
23923
23923
|
Math.min(o, m * c)
|
|
23924
|
-
);
|
|
23924
|
+
), p = Math.max(1, y);
|
|
23925
23925
|
u = u.replace(
|
|
23926
23926
|
/\d+(?:\.\d+)?(px|rem|em)/,
|
|
23927
|
-
`${
|
|
23927
|
+
`${p.toFixed(1)}${_}`
|
|
23928
23928
|
);
|
|
23929
23929
|
}
|
|
23930
23930
|
let f = n.padding || [3, 6, 3, 6];
|
|
23931
23931
|
f = f.map((m, _) => {
|
|
23932
|
-
const y = m * c, p = a[_] ??
|
|
23932
|
+
const y = m * c, p = a[_] ?? 0, E = l[_] ?? 16;
|
|
23933
23933
|
return Math.max(p, Math.min(E, y));
|
|
23934
23934
|
});
|
|
23935
23935
|
const g = n.offsetY ? n.offsetY * c : void 0;
|