Moveable
    Preparing search index...

    Interface RotatableOptions

    interface RotatableOptions {
        displayAroundControls?: boolean;
        edge?: boolean | LineDirection[];
        renderDirections?: boolean | string[];
        resolveAblesWithRotatable?: Record<string, LineDirection[]> | null;
        rotatable?: boolean | RotatableOptions;
        rotateAroundControls?: boolean;
        rotationPosition?: RotationPosition | RotationPosition[];
        rotationTarget?:
            | false
            | MoveableRefType<SVGElement | HTMLElement>
            | ArrayFormat<MoveableRefType<SVGElement | HTMLElement>>;
        throttleRotate?: number;
    }

    Hierarchy (View Summary)

    Index
    displayAroundControls?: boolean

    You can expand the area around the control. Either rotateAroundControls or displayAroundControls can be used. You can set the area through the controlPadding value.

    0.44.0

    false
    
    edge?: boolean | LineDirection[]

    Whether to scale and resize through edge lines. You can use "n", "w", "s", "e" in LineDirection array.

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

    const moveable = new Moveable(document.body);
    moveable.edge = true;
    renderDirections?: boolean | string[]

    Set directions to show the control box.

    false if rotatable, ["n", "nw", "ne", "s", "se", "sw", "e", "w"] otherwise
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    warpable: true,
    renderDirections: ["n", "nw", "ne", "s", "se", "sw", "e", "w"],
    });

    moveable.renderDirections = ["nw", "ne", "sw", "se"];
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    scalable: true,
    renderDirections: ["n", "nw", "ne", "s", "se", "sw", "e", "w"],
    });

    moveable.renderDirections = ["nw", "ne", "sw", "se"];
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    resizable: true,
    renderDirections: ["n", "nw", "ne", "s", "se", "sw", "e", "w"],
    });

    moveable.renderDirections = ["nw", "ne", "sw", "se"];
    resolveAblesWithRotatable?: Record<string, LineDirection[]> | null

    Sets the control that will cause resize along with rotate. (Only Single Target, Only resizable, Beta)

    null
    
    rotatable?: boolean | RotatableOptions

    Whether or not target can be rotated.

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

    const moveable = new Moveable(document.body);

    moveable.rotatable = true;
    rotateAroundControls?: boolean

    You can rotate around direction controls. Either rotateAroundControls or displayAroundControls can be used.

    0
    
    rotationPosition?: RotationPosition | RotationPosition[]

    You can specify the position of the rotation.

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

    const moveable = new Moveable(document.body, {
    rotationPosition: "top",
    });

    moveable.rotationPosition = "bottom"
    rotationTarget?:
        | false
        | MoveableRefType<SVGElement | HTMLElement>
        | ArrayFormat<MoveableRefType<SVGElement | HTMLElement>>

    Set additional rotationTargets.

    null
    
    throttleRotate?: number

    throttle of angle(degree) when rotate.

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

    const moveable = new Moveable(document.body);

    moveable.throttleRotate = 1;