Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(_, childDatas) => {
const [clientX, clientY] = caculate(
createRotateMatrix(moveable.rotation / 180 * Math.PI, 3),
[
childDatas.originalX * parentScale[0],
childDatas.originalY * parentScale[1],
1,
],
3,
);
return {
...e,
parentScale,
dragClient: plus(fixedPosition, [clientX, clientY]),
parentKeepRatio: keepRatio,
};
},
);
(child, childDatas) => {
const pos = getPosByReverseDirection(getAbsolutePosesByState(child.state), direction);
const [originalX, originalY] = caculate(
createRotateMatrix(-moveable.rotation / 180 * Math.PI, 3),
[pos[0] - startPos[0], pos[1] - startPos[1], 1],
3,
);
childDatas.originalX = originalX;
childDatas.originalY = originalY;
return e;
},
);