EqBand

EqBand

new EqBand(optionsopt)

Source:
Properties:
Name Type Attributes Default Description
options.type String | function <optional>
"parametric"

The type of the filter. Possible values are parametric, notch, low-shelf, high-shelf, lowpass[n] or highpass[n].

options.freq Number

Frequency setting. This is an alias for the option x defined by ChartHandle.

options.gain Number

Gain setting. This is an alias for the option y defined by ChartHandle.

options.q Number

Quality setting. This is an alias for the option z defined by ChartHandle.

options.active Boolean <optional>
true

Set to false to not take this filter into account when drawing the response graph.

An EqBand extends a ChartHandle and holds a dependent Filter. It is used as a fully functional representation of a single equalizer band in Equalizer EqBand needs a Chart or any other derivate to be drawn in.

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

An object containing initial options.

Extends

Members

_handle :SVGCircular

Source:
Inherited From:

The main handle. Has class .aux-handle.

Type:
  • SVGCircular

_label :SVGText

Source:
Inherited From:

The label. Has class .aux-label.

Type:
  • SVGText

_line1 :SVGPath

Source:
Inherited From:

The first line. Has class .aux-line .aux-line1.

Type:
  • SVGPath

_line2 :SVGPath

Source:
Inherited From:

The second line. Has class .aux-line .aux-line2.

Type:
  • SVGPath

_zhandle :SVGCircular

Source:
Inherited From:

The handle for manipulating z axis. Has class .aux-zhandle.

Type:
  • SVGCircular

element :HTMLDivElement

Source:
Overrides:

The main SVG group. Has class .aux-eqband.

Type:
  • HTMLDivElement

filter :Filter

Source:

The filter providing the graphical calculations.

Type:

range_x :Range

Source:
Inherited From:

The Range for the x axis.

Type:

range_y :Range

Source:
Inherited From:

The Range for the y axis.

Type:

range_z :Range

Source:
Inherited From:

The Range for the z axis.

Type:

Methods

addChild(child)

Source:
Inherited From:
See:

Registers a widget as a child widget. This method is used to build up the widget tree. It does not modify the DOM tree.

Parameters:
Name Type Description
child Widget

The child to add.

Fires:
  • Widget#event:child_added

addChildren(a)

Source:
Inherited From:

Registers an array of widgets as children.

Parameters:
Name Type Description
a Array.<Widget>

An array of Widgets.

allChildren()

Source:
Inherited From:

Returns an array of all children.

appendChild(child)

Source:
Inherited From:

Appends child.element to the widget element and registers child as a child widget.

Parameters:
Name Type Description
child Widget

The child widget to append.

appendChildren(children)

Source:
Inherited From:

Calls Widget#appendChild for an array of widgets.

Parameters:
Name Type Description
children Array.<Widget>

The child widgets to append.

destroy()

Source:
Inherited From:

Dispose of this Widget.

destroyAndRemove()

Source:
Inherited From:

Dispose of this Widget and remove it from the DOM.

disableTansitions()

Source:
Inherited From:

Disable CSS transitions.

enableDraw()

Source:
Inherited From:

Schedules this widget for drawing.

Fires:

enableDrawChildren()

Source:
Inherited From:

Enables rendering for all children of this widget.

enableTransitions()

Source:
Inherited From:

Enable CSS transitions.

forceHide()

Source:
Inherited From:

Hide the widget immediately by applying the class aux-hide. Does not call disableDraw().

forceShow()

Source:
Inherited From:

Show the widget immediately by applying the class aux-show. Does not call enableDraw().

frequencyToGain(freq) → {number}

Source:

Calculate the gain for a given frequency in Hz.

Parameters:
Name Type Description
freq number

The frequency.

Returns:

The gain at the given frequency.

Type
number

getStyle()

Source:
Inherited From:

Returns the computed style of this widget's DOM element.

hidden()

Source:
Inherited From:

Returns the current hidden status.

hide()

Source:
Inherited From:

Hide the widget. This will result in the class aux-hide being applied to this widget in the next rendering step.

invalidate(key)

Source:
Inherited From:

Invalidates an option and triggers a redraw() call.

Parameters:
Name Type Description
key string

invalidateAll()

Source:
Inherited From:

Invalidates all dependencies which will trigger all renderers to rerun.

observeResize(cb)

Source:
Inherited From:

Calls a callback whenever the widget resizes. This method will trigger one resize.

Parameters:
Name Type Description
cb function

removeChild(child)

Source:
Inherited From:

Removes a child widget. Note that this method only modifies the widget tree and does not change the DOM.

Parameters:
Name Type Description
child Widget

The child to remove.

Fires:
  • Widget#event:child_removed

removeChildren(a)

Source:
Inherited From:

Removes an array of children.

Parameters:
Name Type Description
a Array.<Widget>

An array of Widgets.

set(key, value)

Source:
Overrides:

Sets an option.

Parameters:
Name Type Description
key string

The option name.

value

The option value.

setStyle()

Source:
Inherited From:

Sets a CSS style property in this widget's DOM element.

show()

Source:
Inherited From:

Make the widget visible. This will apply the class aux-show during the next rendering step.

toFront()

Source:
Overrides:

Moves the handle to the front, i.e. add as last element to the containing SVG group element.

toggleHidden()

Source:
Inherited From:

Toggle the hidden status. This is equivalent to calling hide() or show(), depending on the current hidden status of this widget.

transitionsDisabled()

Source:
Inherited From:

Returns true if transitions are currently disabled on this widget.

visibleChildren()

Source:
Inherited From:

Returns an array of all visible children.

Events

destroy

Source:
Inherited From:

Is fired when a widget is destroyed.

doubleclick

Source:
Inherited From:

Is fired after a double click appeared. Set dblclick to 0 to disable click event handling.

Parameters:
Name Type Description
event string

The browsers MouseEvent.

GenericDOMEvents

Source:
Inherited From:

Generic DOM events. Please refer to W3Schools for further details.

handlegrabbed

Source:
Inherited From:

Is fired when the main handle is grabbed by the user. The argument is an object with the following members:

  • x: the actual value on the x axis
  • y: the actual value on the y axis
  • pos_x: the position in pixels on the x axis
  • pos_y: the position in pixels on the y axis
Parameters:
Name Type Description
positions Object

An object containing all relevant positions of the pointer.

handlereleased

Source:
Inherited From:

Is fired when the user releases the main handle. The argument is an object with the following members:

  • x: the actual value on the x axis
  • y: the actual value on the y axis
  • pos_x: the position in pixels on the x axis
  • pos_y: the position in pixels on the y axis
Parameters:
Name Type Description
positions Object

An object containing all relevant positions of the pointer.

hide

Source:
Inherited From:

The hide event is emitted when a widget is hidden and is not rendered anymore. This happens both with browser visibility changes and also internally when using layout widgets such as Pager.

initialized

Source:
Inherited From:

Is fired when a widget is initialized.

resize

Source:
Inherited From:

The resize event is emitted whenever a widget is being resized. This event can be used to e.g. measure its new size. Note that some widgets do internal adjustments after the resize event. If that is relevant, the Widget#resized event can be used instead.

resized

Source:
Inherited From:

The resized event is emitted after each rendering frame, which was triggered by a resize event.

set

Source:
Inherited From:

The set event is emitted when an option was set using the Widget#set method. The arguments are the option name and its new value.

Note that this happens both for user interaction and programmatical option changes.

show

Source:
Inherited From:

The show event is emitted when a widget is shown and is being rendered. This is the counterpart to Widget#hide.

useraction

Source:
Inherited From:

The useraction event is emitted when a widget gets modified by user interaction. The event is emitted for the options x, y and z.

Parameters:
Name Type Description
name string

The name of the option which was changed due to the users action.

value mixed

The new value of the option.

visibility

Source:
Inherited From:

Is fired when the visibility state changes. The first argument is the visibility state, which is either true or false.

zchangeended

Source:
Inherited From:

Is fired when the user releases the z-handle. The argument is the actual z value.

Parameters:
Name Type Description
z number

The z value.

zchangestarted

Source:
Inherited From:

Is fired when the user grabs the z-handle. The argument is the actual z value.

Parameters:
Name Type Description
z number

The z value.