Moveable
    Preparing search index...

    Interface RoundableOptions

    interface RoundableOptions {
        isDisplayShadowRoundControls?: boolean | "horizontal";
        maxRoundControls?: number[];
        minRoundControls?: number[];
        roundable?: boolean;
        roundClickable?: boolean | "control" | "line";
        roundPadding?: number;
        roundRelative?: boolean;
    }

    Hierarchy (View Summary)

    Index
    isDisplayShadowRoundControls?: boolean | "horizontal"

    Whether to show a round control that does not actually exist as a shadow

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

    const moveable = new Moveable(document.body, {
    roundable: true,
    isDisplayShadowRoundControls: false,
    });
    moveable.isDisplayShadowRoundControls = true;
    maxRoundControls?: number[]

    Maximum number of round controls. It moves in proportion by control. [horizontal, vertical]

    [4, 4]
    
    import Moveable from "@moveable-next/vanilla";

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    maxRoundControls: [4, 4],
    });
    moveable.maxRoundControls = [1, 0];
    minRoundControls?: number[]

    Minimum number of round controls. It moves in proportion by control. [horizontal, vertical]

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

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    minRoundControls: [0, 0],
    });
    moveable.minRoundControls = [1, 0];
    roundable?: boolean

    Whether to show and drag or double click border-radius.

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

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    });
    moveable.on("roundStart", e => {
    console.log(e);
    }).on("round", e => {
    e.target.style.borderRadius = e.borderRadius;
    }).on("roundEnd", e => {
    console.log(e);
    });
    roundClickable?: boolean | "control" | "line"

    Whether you can add/delete round controls by double-clicking a line or control.

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

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    roundClickable: true,
    });
    moveable.roundClickable = false;
    roundPadding?: number

    The padding value of the position of the round control

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

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundPadding: 0,
    });
    moveable.roundPadding = 15;
    roundRelative?: boolean

    % Can be used instead of the absolute px

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

    const moveable = new Moveable(document.body, {
    roundable: true,
    roundRelative: false,
    });
    moveable.on("roundStart", e => {
    console.log(e);
    }).on("round", e => {
    e.target.style.borderRadius = e.borderRadius;
    }).on("roundEnd", e => {
    console.log(e);
    });