Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MultiLine

Class used to create multi line control

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new MultiLine(name?: string | undefined): MultiLine
  • Creates a new MultiLine

    Parameters

    • Optional name: string | undefined

      defines the control name

    Returns MultiLine

Properties

clipChildrenSearch playground for clipChildren

clipChildren: boolean

Gets or sets a boolean indicating if the children are clipped to the current control bounds. Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children

clipContentSearch playground for clipContent

clipContent: boolean

Gets or sets a boolean indicating that control content must be clipped Please note that not clipping children may generate issues with adt.useInvalidateRectOptimization so it is recommended to turn this optimization off if you want to use unclipped children

fixedRatioSearch playground for fixedRatio

fixedRatio: number

Gets or sets a fixed ratio for this control. When different from 0, the ratio is used to compute the "second" dimension. The first dimension used in the computation is the last one set (by setting width / widthInPixels or height / heightInPixels), and the second dimension is computed as first dimension * fixedRatio

hoverCursorSearch playground for hoverCursor

hoverCursor: string

Gets or sets the cursor to use when the control is hovered

isFocusInvisibleSearch playground for isFocusInvisible

isFocusInvisible: boolean

Gets or sets a boolean indicating if the control can be focusable

isHitTestVisibleSearch playground for isHitTestVisible

isHitTestVisible: boolean

Gets or sets a boolean indicating if the control can be hit with pointer events

isPointerBlockerSearch playground for isPointerBlocker

isPointerBlocker: boolean

Gets or sets a boolean indicating if the control can block pointer events

metadataSearch playground for metadata

metadata: any

Gets or sets an object used to store user defined information for the node

Optional nameSearch playground for name

name: string | undefined

onAfterDrawObservableSearch playground for onAfterDrawObservable

onAfterDrawObservable: Observable<Control>

An event triggered after the control was drawn

onBeforeDrawObservableSearch playground for onBeforeDrawObservable

onBeforeDrawObservable: Observable<Control>

An event triggered before drawing the control

onDirtyObservableSearch playground for onDirtyObservable

onDirtyObservable: Observable<Control>

An event triggered when the control is marked as dirty

onDisposeObservableSearch playground for onDisposeObservable

onDisposeObservable: Observable<Control>

An event triggered when the control has been disposed

onPointUpdateSearch playground for onPointUpdate

onPointUpdate: () => void

Function called when a point is updated

Type declaration

    • (): void
    • Returns void

onPointerClickObservableSearch playground for onPointerClickObservable

onPointerClickObservable: Observable<Vector2WithInfo>

An event triggered when a control is clicked on

onPointerDownObservableSearch playground for onPointerDownObservable

onPointerDownObservable: Observable<Vector2WithInfo>

An event triggered when the pointer taps the control

onPointerEnterObservableSearch playground for onPointerEnterObservable

onPointerEnterObservable: Observable<Control>

An event triggered when pointer enters the control

onPointerMoveObservableSearch playground for onPointerMoveObservable

onPointerMoveObservable: Observable<Vector2>

An event triggered when the pointer move over the control.

onPointerOutObservableSearch playground for onPointerOutObservable

onPointerOutObservable: Observable<Control>

An event triggered when the pointer move out of the control.

onPointerUpObservableSearch playground for onPointerUpObservable

onPointerUpObservable: Observable<Vector2WithInfo>

An event triggered when pointer up

onWheelObservableSearch playground for onWheelObservable

onWheelObservable: Observable<Vector2>

An event triggered when pointer wheel is scrolled

parentSearch playground for parent

Gets or sets the control parent

uniqueIdSearch playground for uniqueId

uniqueId: number

Gets or sets the unique id of the node. Please note that this number will be updated when the control is added to a container

useBitmapCacheSearch playground for useBitmapCache

useBitmapCache: boolean

Gets or sets a boolean indicating that the current control should cache its rendering (useful when the control does not change often)

Static AllowAlphaInheritanceSearch playground for AllowAlphaInheritance

AllowAlphaInheritance: boolean

Gets or sets a boolean indicating if alpha must be an inherited value (false by default)

Accessors

alpha

  • get alpha(): number
  • set alpha(value: number): any
  • Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent)

    Returns number

  • Gets or sets alpha value for the control (1 means opaque and 0 means entirely transparent)

    Parameters

    • value: number

    Returns any

centerX

  • get centerX(): number
  • Gets the center coordinate on X axis

    Returns number

centerY

  • get centerY(): number
  • Gets the center coordinate on Y axis

    Returns number

color

  • get color(): string
  • set color(value: string): any
  • Gets or sets foreground color

    Returns string

  • Gets or sets foreground color

    Parameters

    • value: string

    Returns any

dash

  • get dash(): Array<number>
  • set dash(value: Array<number>): any
  • Gets or sets dash pattern

    Returns Array<number>

  • Gets or sets dash pattern

    Parameters

    • value: Array<number>

    Returns any

disabledColor

  • get disabledColor(): string
  • set disabledColor(value: string): any
  • Gets or sets background color of control if it's disabled

    Returns string

  • Gets or sets background color of control if it's disabled

    Parameters

    • value: string

    Returns any

disabledColorItem

  • get disabledColorItem(): string
  • set disabledColorItem(value: string): any
  • Gets or sets front color of control if it's disabled

    Returns string

  • Gets or sets front color of control if it's disabled

    Parameters

    • value: string

    Returns any

fontFamily

  • get fontFamily(): string
  • set fontFamily(value: string): any
  • Gets or set font family

    Returns string

  • Gets or set font family

    Parameters

    • value: string

    Returns any

fontOffset

  • get fontOffset(): { ascent: number; descent: number; height: number }
  • set fontOffset(offset: { ascent: number; descent: number; height: number }): any
  • Gets or set information about font offsets (used to render and align text)

    Returns { ascent: number; descent: number; height: number }

    • ascent: number
    • descent: number
    • height: number
  • Gets or set information about font offsets (used to render and align text)

    Parameters

    • offset: { ascent: number; descent: number; height: number }
      • ascent: number
      • descent: number
      • height: number

    Returns any

fontSize

  • get fontSize(): string | number
  • set fontSize(value: string | number): any
  • Gets or sets font size

    Returns string | number

  • Gets or sets font size

    Parameters

    • value: string | number

    Returns any

fontSizeInPixels

  • get fontSizeInPixels(): number
  • set fontSizeInPixels(value: number): any
  • Gets or sets font size in pixels

    Returns number

  • Gets or sets font size in pixels

    Parameters

    • value: number

    Returns any

fontStyle

  • get fontStyle(): string
  • set fontStyle(value: string): any
  • Gets or sets font style

    Returns string

  • Gets or sets font style

    Parameters

    • value: string

    Returns any

fontWeight

  • get fontWeight(): string
  • set fontWeight(value: string): any
  • Gets or sets font weight

    Returns string

  • Gets or sets font weight

    Parameters

    • value: string

    Returns any

height

  • get height(): string | number
  • set height(value: string | number): any

heightInPixels

  • get heightInPixels(): number
  • set heightInPixels(value: number): any

horizontalAlignment

  • set horizontalAlignment(value: number): any

host

isDirty

  • get isDirty(): boolean
  • Gets a boolean indicating that the control needs to update its rendering

    Returns boolean

isEnabled

  • get isEnabled(): boolean
  • set isEnabled(value: boolean): any
  • Gets or sets if control is Enabled

    Returns boolean

  • Gets or sets if control is Enabled

    Parameters

    • value: boolean

    Returns any

isHighlighted

  • get isHighlighted(): boolean
  • set isHighlighted(value: boolean): any
  • Gets or sets a boolean indicating that we want to highlight the control (mostly for debugging purpose)

    Returns boolean

  • Gets or sets a boolean indicating that we want to highlight the control (mostly for debugging purpose)

    Parameters

    • value: boolean

    Returns any

isVisible

  • get isVisible(): boolean
  • set isVisible(value: boolean): any
  • Gets or sets a boolean indicating if the control is visible

    Returns boolean

  • Gets or sets a boolean indicating if the control is visible

    Parameters

    • value: boolean

    Returns any

left

  • get left(): string | number
  • set left(value: string | number): any

leftInPixels

  • get leftInPixels(): number
  • set leftInPixels(value: number): any

lineWidth

  • get lineWidth(): number
  • set lineWidth(value: number): any
  • Gets or sets line width

    Returns number

  • Gets or sets line width

    Parameters

    • value: number

    Returns any

linkOffsetX

  • get linkOffsetX(): string | number
  • set linkOffsetX(value: string | number): any

linkOffsetXInPixels

  • get linkOffsetXInPixels(): number
  • set linkOffsetXInPixels(value: number): any

linkOffsetY

  • get linkOffsetY(): string | number
  • set linkOffsetY(value: string | number): any

linkOffsetYInPixels

  • get linkOffsetYInPixels(): number
  • set linkOffsetYInPixels(value: number): any

linkedMesh

notRenderable

  • get notRenderable(): boolean
  • set notRenderable(value: boolean): any
  • Gets or sets a boolean indicating if the control can be rendered

    Returns boolean

  • Gets or sets a boolean indicating if the control can be rendered

    Parameters

    • value: boolean

    Returns any

paddingBottom

  • get paddingBottom(): string | number
  • set paddingBottom(value: string | number): any

paddingBottomInPixels

  • get paddingBottomInPixels(): number
  • set paddingBottomInPixels(value: number): any

paddingLeft

  • get paddingLeft(): string | number
  • set paddingLeft(value: string | number): any

paddingLeftInPixels

  • get paddingLeftInPixels(): number
  • set paddingLeftInPixels(value: number): any

paddingRight

  • get paddingRight(): string | number
  • set paddingRight(value: string | number): any

paddingRightInPixels

  • get paddingRightInPixels(): number
  • set paddingRightInPixels(value: number): any

paddingTop

  • get paddingTop(): string | number
  • set paddingTop(value: string | number): any

paddingTopInPixels

  • get paddingTopInPixels(): number
  • set paddingTopInPixels(value: number): any

rotation

  • get rotation(): number
  • set rotation(value: number): any

scaleX

  • get scaleX(): number
  • set scaleX(value: number): any

scaleY

  • get scaleY(): number
  • set scaleY(value: number): any

shadowBlur

  • get shadowBlur(): number
  • set shadowBlur(value: number): any
  • Gets or sets a value indicating the amount of blur to use to render the shadow

    Returns number

  • Gets or sets a value indicating the amount of blur to use to render the shadow

    Parameters

    • value: number

    Returns any

shadowColor

  • get shadowColor(): string
  • set shadowColor(value: string): any
  • Gets or sets a value indicating the color of the shadow (black by default ie. "#000")

    Returns string

  • Gets or sets a value indicating the color of the shadow (black by default ie. "#000")

    Parameters

    • value: string

    Returns any

shadowOffsetX

  • get shadowOffsetX(): number
  • set shadowOffsetX(value: number): any
  • Gets or sets a value indicating the offset to apply on X axis to render the shadow

    Returns number

  • Gets or sets a value indicating the offset to apply on X axis to render the shadow

    Parameters

    • value: number

    Returns any

shadowOffsetY

  • get shadowOffsetY(): number
  • set shadowOffsetY(value: number): any
  • Gets or sets a value indicating the offset to apply on Y axis to render the shadow

    Returns number

  • Gets or sets a value indicating the offset to apply on Y axis to render the shadow

    Parameters

    • value: number

    Returns any

style

top

  • get top(): string | number
  • set top(value: string | number): any

topInPixels

  • get topInPixels(): number
  • set topInPixels(value: number): any

transformCenterX

  • get transformCenterX(): number
  • set transformCenterX(value: number): any

transformCenterY

  • get transformCenterY(): number
  • set transformCenterY(value: number): any

typeName

  • get typeName(): string
  • Gets the control type name

    Returns string

verticalAlignment

  • set verticalAlignment(value: number): any

width

  • get width(): string | number
  • set width(value: string | number): any

widthInPixels

  • get widthInPixels(): number
  • set widthInPixels(value: number): any

zIndex

  • get zIndex(): number
  • set zIndex(value: number): any
  • Gets or sets z index which is used to reorder controls on the z axis

    Returns number

  • Gets or sets z index which is used to reorder controls on the z axis

    Parameters

    • value: number

    Returns any

Static HORIZONTAL_ALIGNMENT_CENTER

  • get HORIZONTAL_ALIGNMENT_CENTER(): number

Static HORIZONTAL_ALIGNMENT_LEFT

  • get HORIZONTAL_ALIGNMENT_LEFT(): number

Static HORIZONTAL_ALIGNMENT_RIGHT

  • get HORIZONTAL_ALIGNMENT_RIGHT(): number

Static VERTICAL_ALIGNMENT_BOTTOM

  • get VERTICAL_ALIGNMENT_BOTTOM(): number

Static VERTICAL_ALIGNMENT_CENTER

  • get VERTICAL_ALIGNMENT_CENTER(): number

Static VERTICAL_ALIGNMENT_TOP

  • get VERTICAL_ALIGNMENT_TOP(): number

Methods

_drawSearch playground for _draw

_measureSearch playground for _measure

  • _measure(): void
  • Returns void

addSearch playground for add

  • Adds new points to the point collection

    Parameters

    • Rest ...items: (AbstractMesh | Control | { x: string | number; y: string | number })[]

      defines the list of items (mesh, control or 2d coordiantes) to add

    Returns MultiLinePoint[]

    the list of created MultiLinePoint

containsSearch playground for contains

  • contains(x: number, y: number): boolean
  • Tests if a given coordinates belong to the current control

    Parameters

    • x: number

      defines x coordinate to test

    • y: number

      defines y coordinate to test

    Returns boolean

    true if the coordinates are inside the control

disposeSearch playground for dispose

  • dispose(): void
  • Returns void

getAscendantOfClassSearch playground for getAscendantOfClass

  • Gets the first ascendant in the hierarchy of the given type

    Parameters

    • className: string

      defines the required type

    Returns Nullable<Control>

    the ascendant or null if not found

getAtSearch playground for getAt

  • Gets point stored at specified index

    Parameters

    • index: number

      defines the index to look for

    Returns MultiLinePoint

    the requested point if found

getClassNameSearch playground for getClassName

  • getClassName(): string
  • Get the current class name of the control.

    Returns string

    current class name

getDescendantsSearch playground for getDescendants

  • getDescendants(directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): Control[]
  • Will return all controls that have this control as ascendant

    Parameters

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered

    • Optional predicate: (control: Control) => boolean

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • Parameters

          Returns boolean

    Returns Control[]

    all child controls

getDescendantsToRefSearch playground for getDescendantsToRef

  • getDescendantsToRef(results: Control[], directDescendantsOnly?: boolean, predicate?: (control: Control) => boolean): void
  • Will store all controls that have this control as ascendant in a given array

    Parameters

    • results: Control[]

      defines the array where to store the descendants

    • Optional directDescendantsOnly: boolean

      defines if true only direct descendants of 'this' will be considered, if false direct and also indirect (children of children, an so on in a recursive manner) descendants of 'this' will be considered

    • Optional predicate: (control: Control) => boolean

      defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored

        • Parameters

          Returns boolean

    Returns void

getLocalCoordinatesSearch playground for getLocalCoordinates

  • Gets coordinates in local control space

    Parameters

    • globalCoordinates: Vector2

      defines the coordinates to transform

    Returns Vector2

    the new coordinates in local space

getLocalCoordinatesToRefSearch playground for getLocalCoordinatesToRef

  • Gets coordinates in local control space

    Parameters

    • globalCoordinates: Vector2

      defines the coordinates to transform

    • result: Vector2

      defines the target vector2 where to store the result

    Returns Control

    the current control

getParentLocalCoordinatesSearch playground for getParentLocalCoordinates

  • Gets coordinates in parent local control space

    Parameters

    • globalCoordinates: Vector2

      defines the coordinates to transform

    Returns Vector2

    the new coordinates in parent local space

isAscendantSearch playground for isAscendant

  • isAscendant(container: Control): boolean
  • Determines if a container is an ascendant of the current control

    Parameters

    • container: Control

      defines the container to look for

    Returns boolean

    true if the container is one of the ascendant of the control

linkWithMeshSearch playground for linkWithMesh

moveToVector3Search playground for moveToVector3

  • Move the current control to a vector3 position projected onto the screen.

    Parameters

    • position: Vector3

      defines the target position

    • scene: Scene

      defines the hosting scene

    Returns void

pushSearch playground for push

  • Adds a new point to the point collection

    Parameters

    • Optional item: AbstractMesh | Control | { x: string | number; y: string | number }

      defines the item (mesh, control or 2d coordiantes) to add

    Returns MultiLinePoint

    the created MultiLinePoint

removeSearch playground for remove

  • Remove a specific value or point from the active point collection

    Parameters

    Returns void

resetSearch playground for reset

  • reset(): void
  • Resets this object to initial state (no point)

    Returns void

resetLinksSearch playground for resetLinks

  • resetLinks(): void
  • Resets all links

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Property
  • Method
  • Static property
  • Static method