UNPKG

@frontify/fondue-charts

Version:

Frontify's data viz library

16 lines (15 loc) • 732 B
import { LABEL_PADDING_X as P } from "../components/consts.es.js"; const m = (M, a, L, X, D, f) => { const [h, I] = X; let s = 0, b = 0, p = 0, t = 0; return M < Math.PI / 2 ? (b = h + L + P - a, s = Math.abs(I) - a + D) : M === Math.PI / 2 ? b = Math.abs(h) + L + P - a : M > Math.PI / 2 && M < Math.PI ? (t = I - a + f, b = h + L + P - a) : M === Math.PI ? t = I - a + f : M > Math.PI && M < Math.PI * 1.5 ? (t = Math.abs(I) - a + f, p = Math.abs(h) - a + P) : M === Math.PI * 1.5 ? p = Math.abs(h) - a + P : (s = Math.abs(I) - a + D, p = Math.abs(h) - a + P), { paddingTop: s, paddingRight: b, paddingLeft: p, paddingBottom: t }; }; export { m as getPadding }; //# sourceMappingURL=getPadding.es.js.map