-
Notifications
You must be signed in to change notification settings - Fork 0
ability.Draggable
Gary Soedarsono edited this page Feb 2, 2015
·
10 revisions
extends: [[ability.Ability
|ability.Ability]]
Provides decorator to make an element draggable. Use Abilities to decorate the element. Note that these methods should be called with the element to be decorated as the scope.
new ability.Draggable()
pb-draggable |
Set to true to make this element draggable. |
name | string |
readonly The name of the ability. This is used as an ID to refer to the registered abilities. |
setDefaultValue(!Element el)
Sets the default value of the given element.
el | !Element
|
The element whose default value should be set. |
attributeChangedCallback(!Element el, String name, String oldValue, String newValue)
Handles attribute change.
el | !Element
|
The element whose attribute was changed. |
name | String |
Name of the attribute that was changed. |
oldValue | String |
Old value of the changed attribute. |
newValue | String |
New value of the changed attribute. |
attachedCallback(!Element el)
Handles registration when the element is attached to the document.
el | !Element
|
The element that was attached. |
detachedCallback(!Element el)
Handles unregistration when the element is detached from the document.
el | !Element
|
The element that was detached. |
!Element getMovedElement(!Element el)
Returns the element that will be moved, if the given element were to be dragged and dropped.
el | !Element
|
The element that is dragged. |
returns !Element
: The element that will be moved if the given element was dragged and dropped.