Viewer
    Preparing search index...

    Interface IRectangleTransformParameterProps

    Properties of a selection parameter.

    interface IRectangleTransformParameterProps {
        activeMode?: "default" | "activeOnStart";
        availableColor?: InteractionEffect;
        corners?: {
            bottomLeft?: boolean;
            bottomRight?: boolean;
            topLeft?: boolean;
            topRight?: boolean;
        };
        deselectOnEmpty?: boolean;
        edgeControls?: {
            bottom?: boolean;
            left?: boolean;
            right?: boolean;
            top?: boolean;
        };
        enableRotation?: boolean;
        enableScaling?: boolean;
        enableTranslation?: boolean;
        hover?: boolean;
        hoverColor?: InteractionEffect;
        maximumSelection?: number;
        minimumSelection?: number;
        nameFilter?: string[];
        objects?: IDraggableObject[];
        plane?: Partial<IPlaneRestrictionDefinition>;
        prompt?: {
            activeText?: string;
            activeTitle?: string;
            inactiveTitle?: string;
        };
        restrictions?: RestrictionDefinition[];
        rotation?: {
            handleDistance?: number;
            max?: number;
            min?: number;
            step?: number;
            stepThreshold?: number;
        };
        scaling?: {
            step?: number;
            uMax?: number;
            uMin?: number;
            uniform?: boolean;
            vMax?: number;
            vMin?: number;
        };
        selectionColor?: InteractionEffect;
    }

    Hierarchy (View Summary)

    Index

    Properties

    activeMode?: "default" | "activeOnStart"

    The mode to determine when the parameter is active. (default: 'default')

    availableColor?: InteractionEffect

    The interaction effect on objects when available. (default: '#ffffff')

    corners?: {
        bottomLeft?: boolean;
        bottomRight?: boolean;
        topLeft?: boolean;
        topRight?: boolean;
    }

    Options to disable specific points of the rectangle. Disabled points are not interactive but still visible as locked handles. By default, all points are enabled.

    deselectOnEmpty?: boolean

    If true, the selection will be cleared when clicking on an empty space. (default: false)

    edgeControls?: {
        bottom?: boolean;
        left?: boolean;
        right?: boolean;
        top?: boolean;
    }

    Options to disable specific edgeControls of the rectangle. Disabled edgeControls are not interactive but still visible as locked handles. By default, all edgeControls are enabled.

    enableRotation?: boolean

    If the rotation is enabled. (default: true)

    enableScaling?: boolean

    If the scaling is enabled. (default: true)

    enableTranslation?: boolean

    If the translation is enabled. (default: true)

    hover?: boolean

    If the objects are hoverable. (default: true)

    hoverColor?: InteractionEffect

    The interaction effect on objects when hovered. (default: '#00ff78')

    maximumSelection?: number

    The maximum number of objects that can be selected. (default: 1)

    minimumSelection?: number

    The minimum number of objects that can be selected. (default: 1)

    nameFilter?: string[]

    The names of the objects that can be interacted with. (see Jira document and discussion result)

    objects?: IDraggableObject[]

    The objects that can be dragged.

    For each object, the name filter and the restrictions can be defined. The name filter is used to filter the objects that can be dragged with the defined settings. This means that multiple objects can be dragged with different settings, but also multiple objects can be dragged with the same settings.

    This is only used for dragging, not for rotation or scaling!

    plane?: Partial<IPlaneRestrictionDefinition>

    The plane restriction for the RectangleTransform. At least the plane type and the plane vectors need to be defined if a custom plane restriction is provided. If not provided, a default plane restriction will be applied.

    prompt?: { activeText?: string; activeTitle?: string; inactiveTitle?: string }

    A prompt that can be defined which is displayed instead of the default prompt.

    Type Declaration

    • OptionalactiveText?: string

      The text when the parameter is inactive.

    • OptionalactiveTitle?: string

      The title when the parameter is active.

    • OptionalinactiveTitle?: string

      The title when the parameter is inactive.

    restrictions?: RestrictionDefinition[]

    The restrictions that can be applied to the draggable objects.

    rotation?: {
        handleDistance?: number;
        max?: number;
        min?: number;
        step?: number;
        stepThreshold?: number;
    }

    Type Declaration

    • OptionalhandleDistance?: number

      Distance of the rotation handle above the top edge of the rectangle, expressed as a fraction of the rectangle's height. Default is 0.25.

    • Optionalmax?: number

      The maximum allowed rotation angle around the plane normal. The angle is provided in degrees for easier configuration but will be converted to radians internally. With this setting, it's possible to restrict the rotation to a certain range. Default is undefined (no maximum angle).

    • Optionalmin?: number

      The minimum allowed rotation angle around the plane normal. The angle is provided in degrees for easier configuration but will be converted to radians internally. With this setting, it's possible to restrict the rotation to a certain range. Default is undefined (no minimum angle).

    • Optionalstep?: number

      The step size for rotation around the plane normal. The step is provided in degrees for easier configuration but will be converted to radians internally. With this setting, it's possible to snap the rotation to specific increments. Default is undefined (no snapping).

    • OptionalstepThreshold?: number

      The threshold for snapping during rotation around the plane normal. With this setting, it's possible to define how close the rotation needs to be to a snap point for it to snap. Default is undefined (no snapping threshold).

    scaling?: {
        step?: number;
        uMax?: number;
        uMin?: number;
        uniform?: boolean;
        vMax?: number;
        vMin?: number;
    }

    Scaling options for the RectangleTransform.

    Type Declaration

    • Optionalstep?: number

      The step size for scaling in the local x and y directions. The step is provided in world units. With this setting, it's possible to snap the scaling to specific increments. Default is undefined (no snapping).

    • OptionaluMax?: number

      The maximum allowed length of the rectangle's sides during scaling. With this settings, it's possible to restrict the scaling to a certain range. Default is undefined (no maximum length).

    • OptionaluMin?: number

      The minimum allowed length of the rectangle's sides during scaling. With this settings, it's possible to restrict the scaling to a certain range. Default is undefined (no minimum length).

    • Optionaluniform?: boolean

      If true, the RectangleTransform will maintain a uniform scale, meaning it will scale equally in all directions based on the average of the local x and y scales. If false or undefined, the RectangleTransform will scale independently in the local x and y directions. Default is false (non-uniform scaling).

    • OptionalvMax?: number

      The maximum allowed length of the rectangle's sides during scaling. With this settings, it's possible to restrict the scaling to a certain range. Default is undefined (no maximum length).

    • OptionalvMin?: number

      The minimum allowed length of the rectangle's sides during scaling. With this settings, it's possible to restrict the scaling to a certain range. Default is undefined (no minimum length).

    selectionColor?: InteractionEffect

    The interaction effect on objects when selected. (default: '#0d44f0')