Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let transformOrigin!: number[];
let targetMatrix!: number[];
const offsetContainer = getOffsetInfo(container, container, true).offsetParent;
if (prevMatrix) {
container = target.parentElement;
}
while (el && !isEnd) {
const style: CSSStyleDeclaration = getComputedStyle(el);
const tagName = el.tagName.toLowerCase();
const position = style.position;
const isFixed = position === "fixed";
const styleTransform = style.transform!;
let matrix: number[] = convertCSStoMatrix(getTransformMatrix(styleTransform));
if (!is3d && matrix.length === 16) {
is3d = true;
n = 4;
const matrixesLength = matrixes.length;
for (let i = 0; i < matrixesLength; ++i) {
matrixes[i] = convertDimension(matrixes[i], 3, 4);
}
}
if (is3d && matrix.length === 9) {
matrix = convertDimension(matrix, 3, 4);
}
let offsetLeft = (el as HTMLElement).offsetLeft;
let offsetTop = (el as HTMLElement).offsetTop;