viewerjs
Version:
JavaScript image viewer.
80 lines (56 loc) • 1.72 kB
JavaScript
Viewer.DEFAULTS = {
// Enable inline mode
inline: false,
// Show the button on the top-right of the viewer
button: true,
// Show the navbar
navbar: true,
// Show the title
title: true,
// Show the toolbar
toolbar: true,
// Show the tooltip with image ratio (percentage) when zoom in or zoom out
tooltip: true,
// Enable to move the image
movable: true,
// Enable to zoom the image
zoomable: true,
// Enable to rotate the image
rotatable: true,
// Enable to scale the image
scalable: true,
// Enable CSS3 Transition for some special elements
transition: true,
// Enable to request fullscreen when play
fullscreen: true,
// Enable keyboard support
keyboard: true,
// Define interval of each image when playing
interval: 5000,
// Min width of the viewer in inline mode
minWidth: 200,
// Min height of the viewer in inline mode
minHeight: 100,
// Define the ratio when zoom the image by wheeling mouse
zoomRatio: 0.1,
// Define the min ratio of the image when zoom out
minZoomRatio: 0.01,
// Define the max ratio of the image when zoom in
maxZoomRatio: 100,
// Define the CSS `z-index` value of viewer in modal mode.
zIndex: 2015,
// Define the CSS `z-index` value of viewer in inline mode.
zIndexInline: 0,
// Define where to get the original image URL for viewing
// Type: String (an image attribute) or Function (should return an image URL)
url: 'src',
// Event shortcuts
build: null,
built: null,
show: null,
shown: null,
hide: null,
hidden: null,
view: null,
viewed: null
};