Module: image-viewer

Image viewer component

Source:

Example

<ImageViewer />

Methods

(function) data()

Method data
Source:

(method) backward()

Moves the image viewer backward to the previous image.

Source:

(method) close()

Closes the image viewer.

Source:

(method) compassChanged()

Method compassChanged
Source:

(method) forward()

Moves the image viewer forward to the next image.

Source:

(method) handleDefaultDragStart(event)

Handles the drag start event for the default drag behavior.

Parameters:
Name Type Description
event Event

The drag start event.

Source:

(method) handleDragEnd(event)

Handles the drag end event.

Parameters:
Name Type Description
event Event

The drag end event.

Source:

(method) handleDragMove(event)

Handles the drag move event.

Parameters:
Name Type Description
event Event

The drag move event.

Source:

(method) handleDragStart(event)

Handles the drag start event.

Parameters:
Name Type Description
event Event

The drag start event.

Source:

(method) handleSelectStart(event)

Handles the select start event.

Parameters:
Name Type Description
event Event

The select start event.

Source:

(method) handleZoom(event)

Handles the zoom event.

Parameters:
Name Type Description
event Event

The zoom event.

Source:

(method) load()

Loads the image from the server.

Source:

(method) onTouchEnd()

Method onTouchEnd
Source:

(method) onTouchMove()

Method onTouchMove
Source:

(method) onTouchStart()

Method onTouchStart
Source:

(method) reset()

Method reset
Source:

(method) shouldChangeImage()

Method shouldChangeImage
Source:

(method) show(files, index, needsAuthentication)

Displays the image viewer with the specified files and index.

Parameters:
Name Type Description
files Array

The array of files to display in the image viewer.

index number

The index of the file to display initially.

needsAuthentication boolean

Indicates whether authentication is required to view the images.

Source:

(method) transform()

Sets CSS image transformation depending on scale and drag.

Source: