Image

Image

new Image(imgopt)

Creates XTL image instance.
Parameters:
Name Type Attributes Description
img jQuery | Object <optional>
An optional DOM element of XTL image, or object containg XTL properties.

Members

$dom :jQuery

The DOM element.
Type:

$input :jQuery

The DOM element of hidden input.
Type:

editing :boolean

The flag whether ICE editing is enabled.
Type:
  • boolean

(nullable) height :number

The height.
Type:
  • number

(nullable) input :Object

The XTL input properties.
Type:
  • Object

mutating :boolean

The flag whether input is being mutated.
Type:
  • boolean

(nullable) rendition :string

The rendition.
Type:

(nullable) uri :nge.Uri

The XTL image document URI.
Type:

(nullable) width :number

The width.
Type:
  • number

Methods

(static) init(elem, formopt)

Initializes component.
Parameters:
Name Type Attributes Description
elem DOMElement The element.
form nge.xtl.Form <optional>
The XTL form.

(static) of(image) → {nge.xtl.Image}

Returns nge.xtl.Image instance. If it doesn't exist, it will be created.
Parameters:
Name Type Description
image jQuery | DOMElement | string The XTL img element, or jQuery selector.
Returns:
The Image instance.
Type
nge.xtl.Image

editable($panel, optionsopt)

Turns on ICE image editing.
Parameters:
Name Type Attributes Description
$panel jQuery the editor panel.
options Object <optional>
the editing options.

html() → {jQuery}

Returns or creates DOM element.
Returns:
The DOM element.
Type
jQuery

isPlaceholder() → {boolean}

Determines whether XTL image is an empty placeholder.
Returns:
true if image is placeholder, false otherwise.
Type
boolean

mutable()

Turns on XTL image input editing.

readonly()

Turns off ICE image editing.

setPlaceholder()

Changes XTL image to a placeholder.

setUri(uri, renditionopt)

Sets URI of image.
Parameters:
Name Type Attributes Description
uri nge.Uri | string The Uri object or URI string.
rendition string <optional>
An optional rendition to set.