JavaScript

A5.ViewBoxItem Object

Description

Definition of an item in the view box.

Properties

selectableboolean

Whether or not the item is able to be selected.

dragobject

Drag settings.

allowbooleanfunction(value,itemArguments,item,element,event)

Whether the item is draggable. If a boolean, then a value of true will make the item draggable and a value of false (the default) will not. A function can be used to make the drag conditional.

onstring

When to start the drag. Values can be "down" (the default) and "down-hold".

selectedClassNamestring

The class name to apply to elements of this item type in the view box when they are selected.

disabledClassNamestring

The class name to apply to elements of this item type in the view box when they are disabled.

onBeforeSelectfunction(value,itemArguments,item,element,event)

Override for the default event fired before this specific item type in the view box is selected. If a value of false is returned by the function the selection will not be done.

valuestring

The value being selected.

itemArgumentsstring

Arguments from the specific item selected.

itemobject

The item definition object.

elementelement

The element being selected.

eventeventboolean

The event object. If the selection was programmatic, then the event will be false.

onSelectfunction(value,itemArguments,item,element,event)

Override for the default event fired when this specific item type in the view box is selected.

valuestring

The value selected.

itemArgumentsstring

Arguments from the specific item selected.

itemobject

The item definition object.

elementelement

The element selected.

eventeventboolean

The event object. If the selection was programmatic, then the event will be false.

onClickfunction(value,itemArguments,item,element,event)

Override for the default event fired when an this specific item type the view box is clicked.

valuestring

The value clicked.

itemArgumentsstring

Arguments from the specific item clicked.

itemobject

The item definition object.

elementelement

The element clicked.

eventeventboolean

The event object.

onDblClickfunction(value,itemArguments,item,element,event)

Override for the default event fired when this specific item type in the view box is double clicked.

valuestring

The value double clicked.

itemArgumentsstring

Arguments from the specific item double clicked.

itemobject

The item definition object.

elementelement

The element double clicked.

eventeventboolean

The event object.

onRightClickfunction(value,itemArguments,item,element,event)

Override for the default event fired when this specific item type in the view box is context clicked.

valuestring

The value context clicked.

itemArgumentsstring

Arguments from the specific item context clicked.

itemobject

The item definition object.

elementelement

The element context clicked.

eventeventboolean

The event object.

onDownfunction(value,itemArguments,item,element,event)

Override for the default event fired when this specific item type in the view box is pressed down.

valuestring

The value pressed down.

itemArgumentsstring

Arguments from the specific item pressed down.

itemobject

The item definition object.

elementelement

The element pressed down.

eventeventboolean

The event object.

onUpfunction(value,itemArguments,item,element,event)

Override for the default event fired when this specific item type in the view box is release.

valuestring

The value release on.

itemArgumentsstring

Arguments from the specific item release on.

itemobject

The item definition object.

elementelement

The element release on.

eventeventboolean

The event object.

onSwipefunction(value,itemArguments,item,element,event)

Override for the default event fired when this specific item type in the view box is swiped.

valuestring

The value swiped on.

itemArgumentsstring

Arguments from the specific item swiped on.

itemobject

The item definition object.

elementelement

The element swiped on.

eventeventboolean

The event object.

onDownHoldfunction(value,itemArguments,item,element,event)

Override for the default event fired when this specific item type in the view box is pressed and held.

valuestring

The value pressed and held.

itemArgumentsstring

Arguments from the specific item pressed and held.

itemobject

The item definition object.

elementelement

The element pressed and held.

eventeventboolean

The event object.

onDragStartfunction(dragInfo,value,itemArguments,item,element,event)

Override for the default event fired when a drag is started on this specific item type in the view box.

dragInfoobject

The drag data.

xnumber

The location on the X axis.

ynumber

The location on the Y axis.

startobject

The start values.

xnumber

The start value on the X axis.

ynumber

The start value on the Y axis.

minobject

The minimum values.

xnumber

The minimum value on the X axis.

ynumber

The minimum value on the Y axis.

maxobject

The maximum values.

xnumber

The maximum value on the X axis.

ynumber

The maximum value on the Y axis.

valuestring

The value being dragged.

itemArgumentsstring

Arguments from the specific item being dragged.

itemobject

The item definition object.

elementelement

The element being dragged.

eventeventboolean

The event object.

onDragMovefunction(dragInfo,value,itemArguments,item,element,event)

Override for the default event fired when a drag is happening on this specific item type in the view box.

dragInfoobject

The drag data.

xnumber

The location on the X axis.

ynumber

The location on the Y axis.

startobject

The start values.

xnumber

The start value on the X axis.

ynumber

The start value on the Y axis.

minobject

The minimum values.

xnumber

The minimum value on the X axis.

ynumber

The minimum value on the Y axis.

maxobject

The maximum values.

xnumber

The maximum value on the X axis.

ynumber

The maximum value on the Y axis.

valuestring

The value being dragged.

itemArgumentsstring

Arguments from the specific item being dragged.

itemobject

The item definition object.

elementelement

The element being dragged.

eventeventboolean

The event object.

onDragEndfunction(dragInfo,value,itemArguments,item,element,event)

Override for the default event fired when a drag is ended on this specific item type in the view box.

dragInfoobject

The drag data.

xnumber

The location on the X axis.

ynumber

The location on the Y axis.

startobject

The start values.

xnumber

The start value on the X axis.

ynumber

The start value on the Y axis.

minobject

The minimum values.

xnumber

The minimum value on the X axis.

ynumber

The minimum value on the Y axis.

maxobject

The maximum values.

xnumber

The maximum value on the X axis.

ynumber

The maximum value on the Y axis.

valuestring

The value being dragged.

itemArgumentsstring

Arguments from the specific item being dragged.

itemobject

The item definition object.

elementelement

The element being dragged.

eventeventboolean

The event object.