Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
[
[left, top, right, bottom],
origin,
pos1,
pos2,
pos3,
pos4,
direction,
] = caculateMoveablePosition(matrix, transformOrigin, width, height);
const n = is3d ? 4 : 3;
let beforePos = [0, 0];
[
beforePos, beforeOrigin, , , , , beforeDirection,
] = caculateMoveablePosition(offsetMatrix, plus(transformOrigin, getOrigin(targetMatrix, n)), width, height);
beforeOrigin = [
beforeOrigin[0] + beforePos[0] - left,
beforeOrigin[1] + beforePos[1] - top,
];
clientRect = getClientRect(target);
containerRect = getClientRect(
getOffsetInfo(parentContainer, parentContainer, true).offsetParent || document.body,
);
rotation = getRotationRad([pos1, pos2], direction);
}
return {
rotation,
containerRect,