ap.fotorama
v0.0.3
Published
Angular module for Fotorama jQuery plugin
Downloads
16
Readme
ap.fotorama — AngularJS Fotorama
Description
Angular module for Fotorama jQuery plugin
Usage
Angular module dependency:
angular.module('myApp', ['ap.fotorama']);As a directive:
<div ap-fotorama="options" ng-model="items">Fotorama setup in controller:
$scope.items = [{img: 'iurl', thumb: 'turl', full: 'furl'}, {...}, ...]; //Model
$scope.options = {
width: '100%',
height: 400,
loop: true,
keyboard: true,
nav: 'thumbs'
}Default settings can be overridden in a service variable apFotoramaConfig
Setting up
width
{string}-nullFotorama width (500 || '100%')minwidth
{string}-nullmaxwidth
{string}-100%('100%')width
{string}-nullFotorama heightminheight
{string}-nullmaxheight
{string}-nullratio
{string}-null('16/9' || 500/333 || 1.5)margin
{string}-2glimpse
{string}-0
navigation, thumbs
nav
{string}-dots('thumbs' || false)navposition
{string}-bottom('top')thumbwidth
{string}-64thumbheight
{string}-64thumbmargin
{string}-2thumbborderwidth
{string}-2allowfullscreen
{string}-false(true || 'native')fit
{string}-contain('cover' || 'scaledown' || 'none')transition
{string}-slide('crossfade' || 'dissolve')transitionduration
{string}-300captions
{string}-truehash
{string}-falsestartindex
{string}-0loop
{string}-falseautoplay
{string}-falsestopautoplayontouch
{string}-truekeyboard
{string}-false
rewinding
arrows
{string}-trueclick
{string}-trueswipe
{string}-truetrackpad
{string}-trueshuffle
{string}-falsedirection
{string}-ltr('rtl')shadows
{string}-true
fields
id
{string}-idName of image id fieldthumb
{string}-thumbName of thumb fieldimg
{string}- `image' Name of image fieldfull
{string}-originalName of original fieldcaption
{string}-captionName of caption fieldactive
{string}-activeName of active image indexdomain
{string}- `` For crossdomain requests ('http://domain.name')
