new UWA.Controls.DropDown.Pointy(options)
A simple positionned dropdown that points a given element or coordinates.
Available Events
All events inherited from UWA.Controls.DropDown.
Examples
var dropdown = new UWA.Control.DropDown.Pointy({
target: myElement
}).inject(myElement, 'after');
dropdown.getInnerElement().setContent('In case the curse does not succeed, this is my lucky stake.');
myElement.addEvent('click', dropdown.show.bind(dropdown));
var dropdown = new UWA.Control.DropDown.Pointy();
dropdown.inject(myElement, 'after');
dropdown.getInnerElement().setContent('In case the curse does not succeed, this is my lucky stake.');
myElement.addEvent('click', function (e) {
dropdown.setPosition(UWA.Event.getPosition(e), {
relative: document.body // event position is absolute, so set the position relative
// to the body
});
dropdown.show();
});
Parameters
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options hash or a option/value pair. Properties
|
Extends
- UWA.Controls.DropDown
Index
Members
-
name :String
-
The control name. Defaults to 'uwa-pointydropdown'.
Type
- String
Methods
-
updatePosition()
-
Overrides UWA.Controls.DropDown.updatePosition.
-
updatePointPosition(place)
-
Move the point toward the target.
Parameters
Name Type Description place
String Where to place the point ('below', 'above', 'left' or 'right')
-
getInnerElement()
-
Overrides UWA.Controls.DropDown.getInnerElement.
-
getContent()
-
Overrides UWA.Controls.DropDown.getContent.