Class: UWA.Controls.Img

UWA/Controls/Img. UWA.Controls.Img

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
Name Type Argument Default Description
className String <optional>
'uwa-img'

Control maincontainer className

url String <optional>
undefined

The image ressource url

width Number <optional>
undefined

Control main container width

height Number <optional>
undefined

Control main container height

Extends

  • UWA.Controls.Abstract

Index

Members

Methods

Members

<protected> defaultOptions

Properties:
Name Type Description
defaultOptions Object

The default controls options.

Methods

buildSkeleton()

Build main dom elements