Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JSR

This is documentation for using JSR API.

For installation, usage, and more information see: https://github.com/soanvig/mm-jsr

Hierarchy

  • JSR

Index

Constructors

Methods

  • destroy(): void
  • Destroy JSR instance, removing all HTML elements (besides container) and event listeners.

    note

    this function does not remove the instance of JSR itself, therefore it does not remove handler already added to JSR, but one can simple forget about this instance, and let garbage-collector to collect it.

    It does not removes original container element.

    Returns void

  • disable(): void
  • Disable JSR by disallowing value changes, and adding .is-disabled class to the container.

    Returns void

  • enable(): void
  • Enable JSR by allowing value changes, and removing .is-disabled class from the container.

    Returns void

  • getRatioValue(index: number): number
  • Get index value (ratio).

    Parameters

    • index: number

      index of value to get

    Returns number

    • ratio value
  • getRealValue(index: number): number
  • Get index value (real).

    Parameters

    • index: number

      index of value to get

    Returns number

    • real value
  • isEnabled(): boolean
  • Return whether JSR is enabled or disabled.

    Returns boolean

  • Add handler listening of any value change.

    Parameters

    Returns VoidFunction

    • returns function that allows to remove handler
  • setRatioValue(index: number, value: number): void
  • Set index value (ratio).

    Parameters

    • index: number

      index of value to set

    • value: number

      ratio value to set

    Returns void

  • setRealValue(index: number, value: number): void
  • Set index value (real).

    Parameters

    • index: number

      index of value to set

    • value: number

      real value to set

    Returns void

Generated using TypeDoc