How to use the @moveable/matrix.multiplyCSS function in @moveable/matrix

To help you get started, we’ve selected a few @moveable/matrix examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github daybrush / moveable / packages / react-moveable / src / react-moveable / ables / Warpable.tsx View on Github external
poses[2],
            poses[3],
            nextPoses[0],
            nextPoses[1],
            nextPoses[2],
            nextPoses[3],
        );

        if (!h.length) {
            return false;
        }

        const matrix = convertMatrixtoCSS(multiply(targetInverseMatrix, h, 4));
        const transform = `${datas.targetTransform} matrix3d(${matrix.join(",")})`;

        const delta = multiplyCSS(invert(prevMatrix, 4), matrix, 4);

        datas.prevMatrix = matrix;

        triggerEvent(moveable, "onWarp", fillParams(moveable, e, {
            delta,
            matrix: multiplyCSS(startMatrix, matrix, 4),
            multiply: multiplyCSS,
            dist: matrix,
            transform,
        }));
        return true;
    },
    dragControlEnd(
github daybrush / moveable / packages / react-moveable / src / react-moveable / ables / Warpable.tsx View on Github external
);

        if (!h.length) {
            return false;
        }

        const matrix = convertMatrixtoCSS(multiply(targetInverseMatrix, h, 4));
        const transform = `${datas.targetTransform} matrix3d(${matrix.join(",")})`;

        const delta = multiplyCSS(invert(prevMatrix, 4), matrix, 4);

        datas.prevMatrix = matrix;

        triggerEvent(moveable, "onWarp", fillParams(moveable, e, {
            delta,
            matrix: multiplyCSS(startMatrix, matrix, 4),
            multiply: multiplyCSS,
            dist: matrix,
            transform,
        }));
        return true;
    },
    dragControlEnd(