Class: Filters

nyc/ol/Filters~ Filters


new Filters(options)

Class for managing controls for filtering a module:nyc/ol/source/FilterAndSort~FilterAndSort vector data source

Parameters:
Name Type Description
options module:nyc/ol/Filters~Filters.Options

Options

Source:

Extends

Methods


append(elements)

A method to append elements to the container

Parameters:
Name Type Description
elements jQuery | Element | Array.<Element> | string

The element to append

Inherited From:
Overrides:
Source:
Returns:

The container

Type
jQuery

filter()

Filter the source according to current state of choices

Source:

find(selector)

A method to return elements in the container

Parameters:
Name Type Description
selector string

jQuery selector

Inherited From:
Overrides:
Source:
Returns:

The element

Type
jQuery

getContainer()

A method to return a control container HTML element wrapped in a JQuery

Inherited From:
Overrides:
Source:
Returns:

The the control container HTML element wrapped in a JQuery

Type
jQuery

getFilters()

Get the filters

Source:
Returns:

The filters

Type
Array.<module:nyc/ol/source/FilterAndSort~FilterAndSort.Filter>

off(eventName, evtHdlr [, hdlrScope])

Remove a previously connected event handler

Parameters:
Name Type Argument Description
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <optional>

The scope in which to invoke the event handler

Inherited From:
Overrides:
Source:

on(eventName, evtHdlr [, hdlrScope])

Connect a function to an event

Parameters:
Name Type Argument Description
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <optional>

The scope in which to invoke the event handler

Inherited From:
Overrides:
Source:

one(eventName, evtHdlr [, hdlrScope])

Connect a function to an event for a single invocation

Parameters:
Name Type Argument Description
eventName string

The name of the event to which the handler will be connected

evtHdlr function

The event handler function

hdlrScope Object <optional>

The scope in which to invoke the event handler

Inherited From:
Overrides:
Source:

prepend(elements)

A method to prepend elements to the container

Parameters:
Name Type Description
elements jQuery | Element | Array.<Element> | string

The element to append

Inherited From:
Overrides:
Source:
Returns:

The container

Type
jQuery

trigger(eventName [, data])

Trigger a named event with event data

Parameters:
Name Type Argument Description
eventName string

The name of the event to trigger

data Object <optional>

The event data

Inherited From:
Overrides:
Source:

Type Definitions


ChoiceOptions

Object type to hold choice options

Type:
  • Object
Properties:
Name Type Description
title string
choiceOptions Array.<module:nyc/Choice~Choice.Options>
Source:

Options

Constructor options for module:nyc/ol/Filters~Filters

Type:
  • Object
Properties:
Name Type Description
target jQuery | Element | string

The DOM node in which to create the Filters

choiceOptions Array.<module:nyc/ol/Filters~Filters.ChoiceOptions>

The filter choices

source module:nyc/ol/source/FilterAndSort~FilterAndSort

The source to filter

Source: