Module: Images

Image controller
Author:
  • Onien
Source:

Classes

Images

Members

(inner) element :HTMLElement

element
Type:
  • HTMLElement
Source:

Methods

(inner) constructor(element)

inits.
Parameters:
Name Type Description
element HTMLElement which element will be controlled
Source:

(inner) setAsBackground(image, animation, elememtopt)

sets a background image of element with animation
Parameters:
Name Type Attributes Default Description
image string
animation Object
Properties
Name Type Description
name string can be none or opacity
time number duration in seconds
easing string css transition easing
elememt HTMLElement <optional>
Images#element
Source:

(inner) setImage(image, elementopt)

sets image. It uses backgroundImage css property and sets it to "url({image})"
Parameters:
Name Type Attributes Default Description
image string image url or base64
element HTMLElement <optional>
Images#element
Source: