Class: OptionItem

OptionItem

OptionItem takes care of Draggable option elements on page. It isn't responsible for the dragging functionality itself, but takses care of actions that are related to it.

Constructor

new OptionItem(queryData, index)

Create OptionItem.
Parameters:
Name Type Description
queryData QueryDataBlock An instance of QueryData.
index number Order index of the option item in a query.
Source:

Members

input

Gets inputItem.
Source:

input

Sets InputItem to be related with this instance of OptionItem. Eg. if this option item has been moved over the dom input element.
Source:

scope

Gets data Object for this OptionItem.
Source:

Methods

createOption() → {OptionItem}

Creates a dom representation of this OptionItem.
Source:
Returns:
- This instance.
Type
OptionItem

deleteInput() → {OptionItem}

Removes assigned InputItem from an OptionItem instance. Eg. if this option item has been moved outside of the dom input element.
Source:
Returns:
- This instance.
Type
OptionItem

positionChanged(inputItemopt) → {OptionItem}

Supposed to be called on OptionItem position change (user drag) and calls the other necessary methods.
Parameters:
Name Type Attributes Description
inputItem InputItem <optional>
If set to the instance of InputItem it will be assigned to this QueryItem an registered as "beign in its scope".
Source:
Returns:
- This instance.
Type
OptionItem