Global

Members

(constant) S

Source:

Global DOM Scheduler.

Methods

calculateEntryPosition()

Source:

Calculates the pixel position of the entry at the given index.

defineChildElement(widget, name, config)

Source:

Creates a HTMLElement as a child for a widget. Is used to simplify widget definitions. E.g. the tiny marker used to display the back-end value is a simple DIV added using child element. The generic element is a DIV added to Widget.element with the class .aux-[name]. Default creating and adding can be overwritten with custom callback functions.

Parameters:
Name Type Description
widget Widget

The Widget to add the child element to.

name string

The identifier of the element. It will be prefixed by an underscore Widget["_" + config.name].

config object

The configuration of the child element.

Properties
Name Type Attributes Default Description
show boolean <optional>
false

Show/hide the child element on initialization.

option string <optional>
"show_"+config.name

A custom option of the parent widget to determine the visibility of the child element. If this is null, Widget.options["show_"+ config.name] is used to toggle its visibility. The child element is visible, if this options is !== false.

display_check function <optional>

A function overriding the generic show_option behavior. If set, this function is called with the value of show_option as argument as soon as it gets set and is supposed to return a boolean defining the visibility of the element.

append function <optional>

A function overriding the generic append mechanism. If not null, this function is supposed to take care of adding the child element to the parent widget's DOM.

create function <optional>

A function overriding the generic creation mechanism. If not null, this function is supposed to create and return a DOM element to be added to the parent widget.

toggle_class boolean <optional>
false

Defines if the parent widget receives the class .aux-has-[name] as soon as the child element is shown.

draw_options array <optional>

A list of options of the parent widget which are supposed to trigger a check if the element has to be added or removed.

draw function <optional>

A function to be called on redraw.

defineChildWidget(widget, name, config)

Source:

Defines a Widget as a child for another widget. This function is used internally to simplify widget definitions. E.g. the Icon of a Button is defined as a child widget. Child widgets are created/added after the initialization of the parent widget. If not configured explicitly, all options of the child widget can be accessed via Widget.options[config.name + "." + option] on the parent widget.

Parameters:
Name Type Description
widget Widget

The Widget to add the ChildWidget to.

name string

The identifier of the element inside the parent element, Widget[config.name].

config object

The configuration of the child element.

Properties
Name Type Attributes Default Description
create Widget

A Widget class derivate to be used as child widget.

fixed boolean <optional>

A fixed child widget cannot be removed after initialization.

show boolean <optional>
false

Show/hide a non-fixed child widget on initialization.

option string <optional>
"show_"+config.name

A custom option of the parent widget to determine the visibility of the child element. If this is null, Widget.options["show_"+ config.name] is used to toggle its visibility. The child element is visible, if this options is !== false.

append function <optional>

A function overriding the generic append mechanism. If not null, this function is supposed to take care of adding the child widget to the parent widget's DOM. Otherwise the element of the child widget is added to the element of the parent widget.

inherit_options boolean <optional>
false

Defines if both widgets share the same set of options. If true, Setting an option on the parent widget also sets the same option on the child widget. If false, the options of the child widget can be accessed via options[config.name + "." + option] in the parent widget.

map_options array <optional>
[]

An array containing option names to be mapped between parent and child widget. If one of these options is set on the parent widget, it also gets set on the child widget. This is a fine-grained version of config.inherit-options.

userset_ignore boolean <optional>
false

Do not care about the userset event of the parent widget, only keep track of set.

userset_delegate boolean <optional>
false

Delegates all user interaction from the child to the parent element. If the user triggers an event on the child widget, the userset function of the parent element is called.

static_events array <optional>
[]

An array of static events to be added to the parent widget. Each entry is a mapping between the name of the event and the callback function.

toggle_class boolean <optional>
false

Defines if the parent widget receives the class .aux-has-[name] as soon as the child element is shown.

blacklist_options array.<string> <optional>

Array containing options names which are skipped on inherit_options.

map_interacting boolean <optional>
true

If true, the interacting property will be true if it is true in the child.

no_resize boolean <optional>
false

If true, no triggerResize is called on the parent as soon as a child is added or removed.

defineRecalculation(widget, dependencies, cb)

Source:

Register a reclaculation function. If one of the dependencies changes it will be called before the next call to redraw().

Parameters:
Name Type Description
widget class

The Widget to define a recalculation function for.

dependencies Array.<string>

The list of options this function uses.

cb function

The function to run. The first parameter will be the options of the widget.

drawPath()

Source:

Draws an SVG path for the current frequency response curve.

getEntry({number) → {VirtualTreeEntryBase}

Source:

Return the entry for the given index. Returns null if there is currently no entry assigned to that index.

Parameters:
Name Type Description
{number

index The element index.

Returns:

The element with the given id or null.

Type
VirtualTreeEntryBase

getEntryById(id) → {VirtualTreeEntryBase}

Source:

Returns the entry for a given id. If no element with the given id can be found or if it is not in view, null will be returned.

Parameters:
Name Type Description
id *

The element id.

Returns:

The element with the given id or null.

Type
VirtualTreeEntryBase

getFilterFunctions()

Source:

Returns the functions representing the frequency response of all active filters.

getIndexById(id) → {number}

Source:

Returns the index of the element with the given id. If no element with the given id can be found or is currently not in the list, -1 is returned.

Parameters:
Name Type Description
id *

The element id.

Returns:

The index of the element with the given id.

Type
number

getVirtualTreeViewLeft()

Source:

Returns the virtual tree view instance of the left tree.

getVirtualTreeViewTop()

Source:

Returns the virtual tree view instance of the top tree.

getVisibleRange()

Source:

Returns the indices of those entries which are currently in view.

invalidate(key)

Source:

Invalidates an option and triggers a redraw() call.

Parameters:
Name Type Description
key string

isChildHidden(child) → {boolean}

Source:

Returns true if the given child is currently marked as hidden in this container.

Parameters:
Name Type Description
child number | Widget
Returns:
Type
boolean

observeResize(cb)

Source:

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

Parameters:
Name Type Description
cb function

scrollEntryIntoView(index, optionsopt)

Source:

Uses the native Element.scrollTo() function to scroll the entry with the given index into view.

Parameters:
Name Type Attributes Description
index number

The index of the entry in the list.

options object | boolean <optional>

Similar to the options of Element.scrollIntoView(). Currently interpreted are options.block and options.behavior.

Properties
Name Type Attributes Default Description
block string <optional>
'top'
behavior string <optional>
'auto'

subscribeOptions(parent, name, callback) → {function}

Source:

Subscribe to the set of options defined in the nearest AUX-OPTIONS component of a given name and parent.

Parameters:
Name Type Description
parent Node

Parent node. This is usually the parent node of the component which references a given set of options.

name String

Options name.

callback function

Callback to call when a set of options become available. Will be called with null as long as no options set can be found.

Returns:
  • Returns a function which must be called in order to unsubscribe from the options.
Type
function

subscribeOptionsAttributes(parent, name, callback) → {function}

Source:

Subscribe to the set of attributes defined by the inheritance chain of AUX-OPTIONS of a given name and parent.

Parameters:
Name Type Description
parent Node

Parent node. This is usually the parent node of the component which references a given set of options.

name String

Options name.

callback function

Callback to call when a set of options become available. Will be called with a Map of attributes.

Returns:
  • Returns a function which must be called in order to unsubscribe from the options.
Type
function

transitionsDisabled()

Source:

Returns true if transitions are currently disabled on this widget.

updateData(index1, index2, connection, source, sink)

Source:

Updates the Indicator with the relevant data.

Parameters:
Name Type Description
index1 Integer

The index of the entry in the first list.

index2 Integer

The index of the entry in the second list.

connection ConnectionData

The connection data.

source PortData

The source data.

sink PortData

The sink data.

updateEntry(entry, virtualtreeview, index, element, treePosition)

Source:

Update the given entry with the new data.

Parameters:
Name Type Description
entry VirtualTreeEntry

The entry widget.

virtualtreeview VirtualTreeView

The tree data.

index number

The index of the element in the list.

element Datum

The data model of the entry.

treePosition Array

The tree position of the entry.