The configuration options for this slider.
The default predicate which determines whether a slider item is active (ie selectable) in the slider or not. This function will be executed each time an item is selected.
The default label generator for a number series.
In numeric mode, the items collection is kept empty. We create SliderItems based on the actual numeric value the user selects. This is an internal cache of previously created SliderItem objects so we can reuse older objects once they've been created.
The underlying collection of observable items, if any, that this slider is bound to. WARNING: Do not modify this collection in any manner whatsoever since it is a reference to an external observableCollection we're binding to.
The token representing the binding to the underlying collection.
Indicates whether the generated slider is animated or not. Defaults to false.
The time interval for this slider if it has been invoked in date mode.
The time interval unit for this slider if it has been invoked in date mode.
Indicates whether snapping to data items or labels is disabled altogether when the slider is in numeric mode - i.e. all data item values are numeric. Defauls to true.
Indicates whether the slider is dealing with dates.
Enable or disable the slider.
Indicates whether this slider contains numeric data only or other types of objects.
The predicate which, will be applied to compute whether an item is active (i.e. selectable) each time it is selected in the slider. Returns true by default.
The items that participate in this slider. This collection is automatically set when an underlying collection is attached to. It need not be set if the slider is configured to display an integer range. This includes a date range measured as milliseconds from epoch.
The label generator function which, if defined, will be applied to compute the labels corresponding to each item in the underlying collection.
If true, will lock the min slider handle at the min value, provided the slider is in range mode. Ineffective in non-range mode.
The numeric start values for the slider handles when the slider is in numeric mode.
The max value for the slider if in numeric mode.
The min value for the slider if in numeric mode.
Defines the steps the time slider will take if the data is numeric. This may be overridden if the next available item is not active.
Indicates whether this slider should be a range slider (two handles) or a solo slider. Defaults to false.
The start labels for the slider handles when the slider is in non-numeric mode.
A language string to be applied to the aria-label of the slider max handle if in range mode. This is for WCAG compliance. If not defined, the currently selected time will be set as the label.
The item currently associated with the max slider handle if range mode is active.
The currently selected label for the second slider handle (if configured as a range slider).
The label for the slider's maximum value.
A language string to be applied to the aria-label of the slider min handle if in range mode. This is for WCAG compliance. If not defined, the currently selected time will be set as the label.
The item currently associated with the min slider handle.
The currently selected label for the first slider handle.
The label for the slider's minimum value.
A language string to be applied to the aria-label of the slider handle if it is not in range mode. This is for WCAG compliance. If not defined, the currently selected time will be set as the label.
The ticks for the slider.
Apply configuration settings or defaults if no settings are available.
Create a SliderItem for the given underlying item.
Internal implementation to get the next or previous active slider item. Returns the item if it exists, null otherwise.
The slider item for which we want to retrieve the next or previous active slider item.
May have two distinct values - "next" for the next active slider item or "prev" for the previous active slider item. Defaults to "next"
May have three distinct values - "active" for active slider item, "inactive" for inactive slider item or "any" for a slider item with any status. Defaults to "any".
Get the label for the current item
Retrieve a numeric slider item by value and update the numeric item cache so subsequent retrievals return the same object.
Update the items collection as the underlying collection changes.
Attaches to an ObservableCollection and automatically generates relevant SliderItems.
The collection to attach to.
Optional function which will be called for each item in the collection. Generates a string label for the item. For example (item: Feature, index: number) => ${index + 1}: ${item.label.get()}
;
Optional. A function which determines whether the current item is active (ie is selectable in the slider) or not. This function will be executed each time an item is selected. If not specified, returns true.
Optional. An array of strings containing one or two values, depicting the start labels of the handle (or handles if in range mode) of the slider. These values will be applied on a best effort basis: 1) At slider creation time:: If the startup label values are valid, they will be applied. 2) When an attached collection is updated:: If the startup label value has not yet been applied and the slider handle has not been moved manually by the user at the point in time when the collection is updated, the startup label values will be applied provided they are valid. Once the user moves either one of the slider handles manually, the startup label values will no longer be respected. If no startup label values are provided, the handles will start at the first and second data points respectively by default.
Binds a handler to an Observable or to a dojo.connect. Binding to an Observable:
``` this.auto(someObservable, function (newValue) { });
with explicit scope:
this.auto(someObservable, this, function (newValue) { });
Alternately, pass an event name as a string to use dojo.connect:
this.auto(window, "onclick", function () { }); ```
Either an Observable (for observable bindings) or a regular object (if arg1 is a string)
If arg0 is an Observable, a function or scope object. Otherwise, an event name (to use with dojo.connect).
If arg0 is an Observable, a function handler.
Destroys the object completely
Disposes any bindings tracked by this object.
Get the nearest date item snapped to a computed date interval. This will work only in date mode.
The slider item for which the nearest date item needs to be computed.
A string - "next" or "prev" - defining which direction to search in.
A boolean which if true will prevent the function from returning the original item if it's already snapped to interval.
The closest date item if found. Null otherwise.
Get the next active slider item.
The current slider item with respect to which we want to find the next active item.
Get the next inactive slider item.
The current slider item with respect to which we want to find the next inactive item.
Get the next slider item.
The current slider item with respect to which we want to find the next item.
Get the previous active slider item.
The current slider item with respect to which we want to find the previous active item.
Get the previous inactive slider item.
The current slider item with respect to which we want to find the previous inactive item.
Get the previous slider item.
The current slider item with respect to which we want to find the previous item.
Get the raw slider value for a give slider item. Returns the raw slider value or null if the item does not exist.
Gets a language resource from the Application's resource dictionary, given a key, and optional locale. Returns null if the resource does not exist.
The locale of the resource to fetch. Defaults to the current application locale.
Retrieve the updated slider item corresponding to the given slider label. Returns the slider item if found, null otherwise. If more than one item exists with the same label, we'll return the first match.
Retrieve the updated slider item corresponding to the given item value. Returns the slider item if found, null otherwise.
Retrieve the updated slider item corresponding to the raw slider value. Returns the slider item if found, null otherwise.
Initializes the slider configuration. Can either be initialized using the "initialize" method or by passing in the config object directly during instantiation. Explicitly initializing will overwrite any previous configuration settings that may have been applied during slider instantiation.
Override or attach to provide custom clean-up behaviour.
Set the selected slider item for the specified handle in the view model. This function is intended to be invoked by the view code behind and does not update the slider UI widget itself.
The index of the slider handle for which to set the selected slider item.
The SliderItem to update the selected handle value to.
Puts the slider into numeric mode. This will clear out all underlying attached collections if attached previously and convert the slider into a vanilla jQuery numeric slider, albeit with configurable labels. The items collection will remain empty and so will the underlying collection.
The minimum value of the numveric range this slider will represent.
The maximum value fo the numeric range this slider will represent.
Optional parameter defining the number of steps between two data items. If not provided, a default value of 1 will be used for values over 1. 0.1 will be used for values below 1.
Optional parameter defining the rules by which labels should be generated. If not provided, the label will be a string representation of the number itself.
Optional. A function which determines whether the current item is active (ie is selectable in the slider) or not. This function will be executed each time an item is selected. If not specified, returns true.
Optional. An array of numbers containing one or two values, depicting the start values of the handle (or handles if in range mode) of the slider. These values will be applied on a best effort basis: 1) At slider creation time:: If the startup values are valid, they will be applied. 2) When an attached collection is updated:: If the startup value has not yet been applied and the slider handle has not been moved manually by the user at the point in time when the collection is updated, the startup values will be applied provided they are valid. Once the user moves either one of the slider handles manually, the startup values will no longer be respected. If no startup values are provided, the handles will start at the first and second data points respectively by default.
Triggered on every mouse-move during slide. The value provided represents the value that the handle will have as a result of the current movement.
The SliderItem corresponding to the current slider value.
The index of the handle which has currently been slid. This will possible values of 0 or 1.
Tracks a subscription to an {@link geocortex.framework.commands.Command}, disposing it when this object is disposed with the destroy method.
Tracks a subscription to an {@link geocortex.framework.events.Event}, disposing it when this object is disposed with the destroy method.
The view model for the Slider widget.