new ZoomSlider( [opt_options])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
opt_options |
bu.control.SliderOptions |
<optional> |
Slider options. |
- Source:
- bu/controls/zoomslider.js
Fires:
- bu.control.event:SliderEvent
- bu.control.event:ZoomEvent
Extends
Members
-
button1Handler :function
-
The handler to call when the first button is clicked.
Type:
- function
- Inherited From:
- Source:
- bu/controls/slider.js
-
button2Handler :function
-
The handler to call when the second button is clicked.
Type:
- function
- Inherited From:
- Source:
- bu/controls/slider.js
-
changeHandler :function
-
The handler to call when a drag in the control changes. The handler is passed a parameter with the value of the slider inside the minValue and maxValue.
Type:
- function
- Inherited From:
- Source:
- bu/controls/slider.js
-
controldefs :Array.<bu.ControlDefinition>
-
Array of control definitions this control contains.
Type:
- Array.<bu.ControlDefinition>
- Inherited From:
- Source:
- bu/controls/control.js
-
<nullable> element :Element
-
This is the HTML element where the control is drawn. Do not modify this property directly. Use only in the constructor.
Type:
- Element
- Inherited From:
- Source:
- bu/controls/control.js
-
loadHandler :function
-
The handler to call when the control is finally loaded.
Type:
- function
- Inherited From:
- Source:
- bu/controls/slider.js
-
<nullable> target :Element
-
This is the HTML element where the control is appended. Do not modify this property directly. Use constructor or setTarget to set this value.
Type:
- Element
- Inherited From:
- Source:
- bu/controls/control.js
Methods
-
addControlDefinition(controldef)
-
Adds a control definition to the control. By default the control in the control definition is changed its target to the element of this control. Override this behaviour in inherited classes to change the target to another one.
Parameters:
Name Type Description controldef
* Control definition.
- Inherited From:
- Source:
- bu/controls/control.js
-
addControlDefinitions(controldefs)
-
Adds an array of control definitions to the control. Controls in the control definition array shouldn't have a target set.
Parameters:
Name Type Description controldefs
Array.<bu.control.ControlDefinition> Array of control definitions to add.
- Inherited From:
- Source:
- bu/controls/control.js
-
containsControlDefinition(controldef)
-
Checks if a control definition is already added.
Parameters:
Name Type Description controldef
bu.ControlDefinition Control definition to check.
- Inherited From:
- Source:
- bu/controls/control.js
Returns:
True if it is added.
- Type
- boolean
-
getControlDefinitions()
-
Return the array of control definitions this control has inside.
- Inherited From:
- Source:
- bu/controls/control.js
Returns:
- Type
- Array.<bu.ControlDefinition>
-
isTool()
-
Returns true if this control is a tool. A tool is a control that contains one or several options in a list (for example a
bu.control.Switcher
) that are linked to a viewer and only one of them can be active at a time. Tools are usually related to interactions in a way that only one interaction can be active at a time in a viewer.- Inherited From:
- Source:
- bu/controls/control.js
Returns:
- Type
- boolean
-
setMaxValue(val)
-
Sets the max value.
Parameters:
Name Type Description val
number Max value.
- Inherited From:
- Source:
- bu/controls/slider.js
-
setMinValue(val)
-
Sets the min value.
Parameters:
Name Type Description val
number Min value.
- Inherited From:
- Source:
- bu/controls/slider.js
-
setTarget(target)
-
This function is used to set a target element for the control.
Parameters:
Name Type Description target
Element | string | bu.Viewer Target.
- Inherited From:
- Source:
- bu/controls/control.js
-
<abstract> unselectTool()
-
If this control is a tool the unselects the tool.
- Inherited From:
- Source:
- bu/controls/control.js
-
updateLanguage()
-
Updates the control for the current language in the bu.Globalization singleton.
- Inherited From:
- Overrides:
- Source:
- bu/controls/control.js
-
updateValue(val)
-
Updates the slider elements to match a given value.
Parameters:
Name Type Description val
number value.
- Inherited From:
- Source:
- bu/controls/slider.js