new Widget(options)
Itowns/Controls/Widget.js, line 21
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object |
options for function call.
|
Example
var myWidget = new itowns.control.Widget({
name : "myWidget",
element : myWidgetDiv,
target : myWidgetTargetDiv,
position: "absolute"
});
Members
-
constructor
-
Constructor (alias)
Methods
-
getElement(){HTMLElement}
Itowns/Controls/Widget.js, line 41 -
Return the widget's container element.
Returns:
container element.
-
getGlobe(){Object}
Itowns/Controls/Widget.js, line 106 -
Get the globe associated with the widget. Undefined if the widget is not added to a globe.
-
getTarget(){HTMLElement}
Itowns/Controls/Widget.js, line 84 -
Return the widget's target div.
Returns:
target div.
-
setGlobe(globe)
Itowns/Controls/Widget.js, line 116 -
Associate a globe to the widget.
Name Type Description globe Object Globe to associate to the widget.
-
setOptions(options)
Itowns/Controls/Widget.js, line 94 -
Change the options of the widget.
Name Type Description options Object The new options of the control.
-
setTarget(targetDiv, position)
Itowns/Controls/Widget.js, line 52 -
Associates the widget to a specified target div.
Name Type Description targetDiv HTMLElement widget target div.
position String html position attribute.