Class EnvironmentInfo

The EnvironmentInfo class displays information about structure or environment, using a slider for selection and an hidden by default table displaying all properties.

Constructors

  • Create a new EnvironmentInfo inside the DOM element with given id

    Parameters

    • element: string | HTMLElement

      HTML element or string 'id' of the element where the sliders and tables should live

    • properties: {
          [name: string]: Property;
      }

      properties to be displayed

    • indexer: EnvironmentIndexer

      EnvironmentIndexer used to translate indexes from environments index to structure/atom indexes

    • target: DisplayTarget

      Display target, either atom or structure

    • Optionalparameters: {
          [name: string]: Parameter;
      }

      used to describe multidimensional properties

    Returns EnvironmentInfo

Properties

onchange: ((indexes: Indexes) => void) = ...

Callback used when the user changes one of the sliders value

playbackDelay: number = 700

delay in ms between "frames" during playback over structures/atoms, default 700 ms

Methods

  • Show properties for the given indexes, and update the sliders values

    Parameters

    Returns void

  • Change widget display target and adapt the element to the new target

    Parameters

    Returns void