Moveable
    Preparing search index...

    Interface PinchableEvents

    Index
    onPinch: OnPinch

    When pinching, the pinch event is called with part of scale, rotate, resize

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    rotatable: true,
    scalable: true,
    pinchable: true, // ["rotatable", "scalable"]
    });
    moveable.on("pinch", ({ target }) => {
    console.log(target);
    });
    moveable.on("rotate", ({ target }) => {
    console.log(target);
    });
    moveable.on("scale", ({ target }) => {
    console.log(target);
    });
    onPinchEnd: OnPinchEnd

    When the pinch finishes, the pinchEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    rotatable: true,
    scalable: true,
    pinchable: true, // ["rotatable", "scalable"]
    });
    moveable.on("pinchEnd", ({ target }) => {
    console.log(target);
    });
    moveable.on("rotateEnd", ({ target }) => {
    console.log(target);
    });
    moveable.on("scaleEnd", ({ target }) => {
    console.log(target);
    });
    onPinchGroup: OnPinchGroup

    When the group pinch, the pinchGroup event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    pinchable: true
    });
    moveable.on("pinchGroup", ({ targets, events }) => {
    console.log("onPinchGroup", targets);
    });
    onPinchGroupEnd: OnPinchGroupEnd

    When the group pinch finishes, the pinchGroupEnd event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    pinchable: true
    });
    moveable.on("pinchGroupEnd", ({ targets, isDrag }) => {
    console.log("onPinchGroupEnd", targets, isDrag);
    });
    onPinchGroupStart: OnPinchGroupStart

    When the group pinch starts, the pinchGroupStart event is called.

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    target: [].slice.call(document.querySelectorAll(".target")),
    pinchable: true
    });
    moveable.on("pinchGroupStart", ({ targets }) => {
    console.log("onPinchGroupStart", targets);
    });
    onPinchStart: OnPinchStart

    When the pinch starts, the pinchStart event is called with part of scaleStart, rotateStart, resizeStart

    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    rotatable: true,
    scalable: true,
    pinchable: true, // ["rotatable", "scalable"]
    });
    moveable.on("pinchStart", ({ target }) => {
    console.log(target);
    });
    moveable.on("rotateStart", ({ target }) => {
    console.log(target);
    });
    moveable.on("scaleStart", ({ target }) => {
    console.log(target);
    });