Options
All
  • Public
  • Public/Protected
  • All
Menu

An embedded IdeaRoom Configurator

Hierarchy

  • Configurator

Index

Constructors

constructor

  • Parameters

    • configuratorUrl: string

      the URL to the subdomain where the configurator is hosted e.g. https://demo.carportview.com

    • container: string

      the ID value of a html element to embed the configurator in

    • Optional configuratorOptions: Partial<ConfiguratorOptions>

      (optional) settings to initialize the configurator with

    Returns Configurator

Events

addOnBuildingRenderedListener

  • addOnBuildingRenderedListener(method: () => void): void
  • Adds a listener that is triggered when the building is rendered after an update.

    Parameters

    • method: () => void
        • (): void
        • Returns void

    Returns void

addOnErrorListener

  • addOnErrorListener(method: (error: any) => void): void
  • Adds a listener that is triggered when the configurator throws an error

    Parameters

    • method: (error: any) => void
        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns void

onConnected

onConnected: undefined | (() => void)

Triggered after the client was successfully connected.

onLoaded

onLoaded: undefined | ((props: LoadedEventProps) => void)

Triggered after a successful load operation.

onSaved

onSaved: undefined | ((props: SavedEventProps) => void)

Triggered after a successful save operation.

removeOnBuildingRenderedListener

  • removeOnBuildingRenderedListener(method: () => void): void
  • Removes a building rendered listener.

    Parameters

    • method: () => void
        • (): void
        • Returns void

    Returns void

removeOnErrorListener

  • removeOnErrorListener(method: (error: any) => void): void
  • Removes the onError listener

    Parameters

    • method: (error: any) => void
        • (error: any): void
        • Parameters

          • error: any

          Returns void

    Returns void

Methods

changeStructureSupplier

  • changeStructureSupplier(supplierKey: string): Promise<void>
  • Changes the selected structure supplier in the configurator.

    Parameters

    • supplierKey: string

      The supplier key

    Returns Promise<void>

    A promise that is resolved once the supplier successfully changed.

changeStyle

  • changeStyle(styleKey: string): Promise<void>
  • Changes the selected style in the configurator.

    Parameters

    • styleKey: string

      The style key

    Returns Promise<void>

    A promise that is resolved once the style successfully changed.

closeLocationDialog

  • closeLocationDialog(): void
  • Closes the Location/Zip/State dialog if open.

    Returns void

destroy

  • destroy(): void
  • Destroys the embedded configurator iframe. Use it to clear resources.

    Returns void

load

  • load(hash: string, uuid?: string): void
  • Loads a previously saved building. onLoaded will be triggered upon successful completion.

    Parameters

    • hash: string

      a hash value that references a previous save

    • Optional uuid: string

      (optional) a uuid value that references a previous save

    Returns void

save

  • Saves the current building. onSaved will be triggered upon successful completion.

    Parameters

    • saveOptions: SaveOptions

      (optional) settings to control how saves work

    Returns void

saveScreenshot

  • saveScreenshot(width: number, height: number, hideWatermark: boolean, zoomToFit?: number, turnOffShadows?: boolean, cameraRotation?: { x: number; y: number; z: number }): Promise<ScreenShotEventProps>
  • Saves a screenshot of the building.

    Parameters

    • width: number

      screenshot width

    • height: number

      screenshot height

    • hideWatermark: boolean

      hide watermarks on the screenshot

    • Optional zoomToFit: number

      adjust camera zoom before taking the screenshot

    • Optional turnOffShadows: boolean

      turn off the building shadows

    • Optional cameraRotation: { x: number; y: number; z: number }

      the camera rotation used for taking the screenshot

      • x: number
      • y: number
      • z: number

    Returns Promise<ScreenShotEventProps>

    A promise that is resolved with the image as a base64 string

snackbar

  • snackbar(message: string, autoHideDuration?: number, actionLabel?: string, actionCallback?: SnackbarCallback): void
  • Displays a Snackbar message in the configurator.

    For a Snackbar message to have an action both actionLabel and actionCallback must be set.

    Parameters

    • message: string

      the message to display

    • Optional autoHideDuration: number

      (optional) the duration for the snackbar to display in ms unless dismissed

    • Optional actionLabel: string

      (optional) a label to display as the action when used with actionCallback

    • Optional actionCallback: SnackbarCallback

      (optional) a callback to perform when the actionLabel is clicked

    Returns void

Legend

  • Constructor
  • Method
  • Property

Generated using TypeDoc