Picture

Picture

Display image by tag "

" with image as background. Unlike component Img this component doesn't have dependency width <-> height.

Constructor

new Picture()

Source:
Example
let img = new Picture("http://lorempixel.com/400/200/");

Extends

Methods

addListener(value) → {void}

Add new event listener

Parameters:
Name Type Description
value Listener

Listener object

Inherited From:
Source:

className(value) → {string}

Get/Set style-classes

Parameters:
Name Type Description
value String

To set new string of style-classes

Inherited From:
Source:

listen(name, cb, after) → {Listener}

To listen event from this component

Parameters:
Name Type Description
name string

Name of event

cb function

Callback for fired event

after boolean

For phase before changes if "false" (by default) or after changes if "true"

Inherited From:
Source:

removeListener(value) → {void}

To remove installed event listener

Parameters:
Name Type Description
value Listener

Listener object

Inherited From:
Source:

removeListeners() → {void}

To remove all installed event listeners

Inherited From:
Source:

trigger(value) → {Action}

To fire event

Parameters:
Name Type Description
value Action | string

Action object

Inherited From:
Source:

url(value)

Get/Set string of url

Parameters:
Name Type Description
value string | undefined

String with url of type.

Inherited From:
Source:
Example
let img = new Img();
 img.url("http://lorempixel.com/400/200/");