Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IRectangleTransformParameterProps

Properties of a selection parameter.

Hierarchy

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.

Type declaration

  • Optional bottomLeft?: boolean
  • Optional bottomRight?: boolean
  • Optional topLeft?: boolean
  • Optional topRight?: boolean
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.

Type declaration

  • Optional bottom?: boolean
  • Optional left?: boolean
  • Optional right?: boolean
  • Optional top?: boolean
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

  • Optional activeText?: string

    The text when the parameter is inactive.

  • Optional activeTitle?: string

    The title when the parameter is active.

  • Optional inactiveTitle?: 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

  • Optional handleDistance?: 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.

  • Optional max?: 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).

  • Optional min?: 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).

  • Optional step?: 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).

  • Optional stepThreshold?: 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

  • Optional step?: 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).

  • Optional uMax?: 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).

  • Optional uMin?: 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).

  • Optional uniform?: 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).

  • Optional vMax?: 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).

  • Optional vMin?: 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')