LevelMeter

LevelMeter

new LevelMeter(optionsopt)

Source:
Properties:
Name Type Attributes Default Description
options.show_clip Boolean <optional>
false

If set to true, show the clipping LED.

options.clipping Number <optional>
0

If clipping is enabled, this is the threshold for the clipping effect.

options.auto_clip Integer | Boolean <optional>
false

This is the clipping timeout. If set to false automatic clipping is disabled. If set to n the clipping effect times out after n ms, if set to -1 it remains forever.

options.clip Boolean <optional>
false

If clipping is enabled, this option is set to true when clipping happens. When automatic clipping is disabled, it can be set to true to set the clipping state.

options.show_hold Boolean <optional>
false

If set to true, show the hold value LED.

options.hold_size Integer <optional>
1

Size of the hold value LED in the number of segments.

options.auto_hold Number | boolean <optional>
false

If set to false the automatic hold LED is disabled, if set to n the hold value is reset after n ms and if set to -1 the hold value is not reset automatically.

options.top Number <optional>
false

The top hold value. If set to false it will equal the meter level.

options.bottom Number <optional>
false

The bottom hold value. This only exists if a base value is set and the value falls below the base.

options.peak_value Integer | Boolean <optional>
false

If set to false the automatic peak label is disabled, if set to n the peak label is reset after n ms and if set to -1 it remains forever.

options.falling Number <optional>
0

If set to a positive number, activates the automatic falling animation. The meter level will fall by this amount over the time set via options.falling_duration.

options.falling_duration Number <optional>
1000

This is the time in milliseconds for the falling animation. The level falls by options.falling in this period of time.

options.falling_init Number <optional>
50

Initial falling delay in milliseconds. This option can be used to delay the start of the falling animation in order to avoid flickering if internal and external falling are combined.

LevelMeter is a fully functional meter bar displaying numerical values. LevelMeter is an enhanced Meter containing a clip LED and hold markers. In addition, LevelMeter has an optional falling animation, top and bottom peak values and more.

Parameters:
Name Type Attributes Default Description
options Object <optional>
{ }

An object containing initial options.

Extends

Members

_backdrop :HTMLCanvas

Source:
Inherited From:

The canvas element drawing the background. Has class .aux-backdrop.

Type:
  • HTMLCanvas

_bar :HTMLDivElement

Source:
Inherited From:

The DIV element containing the masks and drawing the background. Has class .aux-bar.

Type:
  • HTMLDivElement

_canvas :HTMLCanvas

Source:
Inherited From:

The canvas element drawing the mask. Has class .aux-mask.

Type:
  • HTMLCanvas

element :HTMLDivElement

Source:
Overrides:

The main DIV container. Has class .aux-levelmeter.

Type:
  • HTMLDivElement

label :Label

Source:
Inherited From:

The Label displaying the title. Has class .aux-label.

Type:

scale :Scale

Source:
Inherited From:

The Scale of the meter.

Type:

value :Label

Source:
Inherited From:

The Label displaying the value.

Type:

Methods

resetAll()

Source:

Resets all hold features.

Fires:

resetBottom()

Source:

Resets the bottom hold.

Fires:

resetClip()

Source:

Resets the clipping LED.

Fires:

resetTop()

Source:

Resets the top hold.

Fires:

resetValue()

Source:

Resets the value.

Fires:

Events

resetbottom

Source:

Is fired when the bottom hold was reset.

resetclip

Source:

Is fired when the clipping LED was reset.

resettop

Source:

Is fired when the top hold was reset.

resetvalue

Source:

Is fired when the value label was reset.