new UWA.Controls.Img(options)
Display and img tags and handle resize and various options.
Available Events
Event | Description |
---|---|
onResize |
Invoked when control need to resize |
onLoad |
Invoked when the image load. |
onError |
Invoked when the image load fail |
Example
var myControl = new UWA.Controls.Img({
url: 'http://example.com/hello.jpg',
});
myControl.inject(myControlContainer);
// OR
myControlContainer.appendChild(myControl.getContent());
TODO:
- Implement "resize" and "preload" options.
Parameters
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options hash or a option/value pair. Properties
|
Extends
- UWA.Controls.Abstract
Index
Members
-
<protected> defaultOptions
-
Properties:
Name Type Description defaultOptions
Object The default controls options.
Methods
-
buildSkeleton()
-
Build main dom elements