## bootstrapLightbox : object
**Kind**: global namespace
* [bootstrapLightbox](#bootstrapLightbox) : object
* [.ImageLoader](#bootstrapLightbox.ImageLoader)
* [.load](#bootstrapLightbox.ImageLoader.load) ⇒ Promise
* [.Lightbox](#bootstrapLightbox.Lightbox)
* [.templateUrl](#bootstrapLightbox.Lightbox.templateUrl) : String
* [.fullScreenMode](#bootstrapLightbox.Lightbox.fullScreenMode) : Boolean
* [.getImageUrl](#bootstrapLightbox.Lightbox.getImageUrl) ⇒ String
* [.getImageCaption](#bootstrapLightbox.Lightbox.getImageCaption) ⇒ String
* [.calculateImageDimensionLimits](#bootstrapLightbox.Lightbox.calculateImageDimensionLimits) ⇒ Object
* [.calculateModalDimensions](#bootstrapLightbox.Lightbox.calculateModalDimensions) ⇒ Object
* [.isVideo](#bootstrapLightbox.Lightbox.isVideo) ⇒ Boolean
* [.isSharedVideo](#bootstrapLightbox.Lightbox.isSharedVideo) ⇒ Boolean
* [.images](#bootstrapLightbox.Lightbox.images) : Array
* [.index](#bootstrapLightbox.Lightbox.index) : Number
* [.keyboardNavEnabled](#bootstrapLightbox.Lightbox.keyboardNavEnabled) : Boolean
* [.image](#bootstrapLightbox.Lightbox.image) : \*
* [.modalInstance](#bootstrapLightbox.Lightbox.modalInstance) : Object
* [.imageUrl](#bootstrapLightbox.Lightbox.imageUrl) : String
* [.imageCaption](#bootstrapLightbox.Lightbox.imageCaption) : String
* [.loading](#bootstrapLightbox.Lightbox.loading) : Boolean
* [.openModal](#bootstrapLightbox.Lightbox.openModal) ⇒ Object
* [.closeModal](#bootstrapLightbox.Lightbox.closeModal) : function
* [.setImage](#bootstrapLightbox.Lightbox.setImage) : function
* [.firstImage](#bootstrapLightbox.Lightbox.firstImage) : function
* [.prevImage](#bootstrapLightbox.Lightbox.prevImage) : function
* [.nextImage](#bootstrapLightbox.Lightbox.nextImage) : function
* [.lastImage](#bootstrapLightbox.Lightbox.lastImage) : function
* [.setImages](#bootstrapLightbox.Lightbox.setImages) : function
* [.lightboxSrc](#bootstrapLightbox.lightboxSrc)
### bootstrapLightbox.ImageLoader
Service for loading an image.
**Kind**: static class of [bootstrapLightbox](#bootstrapLightbox)
#### ImageLoader.load ⇒ Promise
Load the image at the given URL.
**Kind**: static property of [ImageLoader](#bootstrapLightbox.ImageLoader)
**Returns**: Promise - A $q promise that resolves when the image has loaded
successfully.
| Param | Type |
| --- | --- |
| url | String |
### bootstrapLightbox.Lightbox
Lightbox service.
**Kind**: static class of [bootstrapLightbox](#bootstrapLightbox)
* [.Lightbox](#bootstrapLightbox.Lightbox)
* [.templateUrl](#bootstrapLightbox.Lightbox.templateUrl) : String
* [.fullScreenMode](#bootstrapLightbox.Lightbox.fullScreenMode) : Boolean
* [.getImageUrl](#bootstrapLightbox.Lightbox.getImageUrl) ⇒ String
* [.getImageCaption](#bootstrapLightbox.Lightbox.getImageCaption) ⇒ String
* [.calculateImageDimensionLimits](#bootstrapLightbox.Lightbox.calculateImageDimensionLimits) ⇒ Object
* [.calculateModalDimensions](#bootstrapLightbox.Lightbox.calculateModalDimensions) ⇒ Object
* [.isVideo](#bootstrapLightbox.Lightbox.isVideo) ⇒ Boolean
* [.isSharedVideo](#bootstrapLightbox.Lightbox.isSharedVideo) ⇒ Boolean
* [.images](#bootstrapLightbox.Lightbox.images) : Array
* [.index](#bootstrapLightbox.Lightbox.index) : Number
* [.keyboardNavEnabled](#bootstrapLightbox.Lightbox.keyboardNavEnabled) : Boolean
* [.image](#bootstrapLightbox.Lightbox.image) : \*
* [.modalInstance](#bootstrapLightbox.Lightbox.modalInstance) : Object
* [.imageUrl](#bootstrapLightbox.Lightbox.imageUrl) : String
* [.imageCaption](#bootstrapLightbox.Lightbox.imageCaption) : String
* [.loading](#bootstrapLightbox.Lightbox.loading) : Boolean
* [.openModal](#bootstrapLightbox.Lightbox.openModal) ⇒ Object
* [.closeModal](#bootstrapLightbox.Lightbox.closeModal) : function
* [.setImage](#bootstrapLightbox.Lightbox.setImage) : function
* [.firstImage](#bootstrapLightbox.Lightbox.firstImage) : function
* [.prevImage](#bootstrapLightbox.Lightbox.prevImage) : function
* [.nextImage](#bootstrapLightbox.Lightbox.nextImage) : function
* [.lastImage](#bootstrapLightbox.Lightbox.lastImage) : function
* [.setImages](#bootstrapLightbox.Lightbox.setImages) : function
#### Lightbox.templateUrl : String
Template URL passed into `$uibModal.open()`.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.fullScreenMode : Boolean
Whether images should be scaled to the maximum possible dimensions.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.getImageUrl ⇒ String
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
**Returns**: String - The URL of the given image.
| Param | Type | Description |
| --- | --- | --- |
| image | \* | An element in the array of images. |
#### Lightbox.getImageCaption ⇒ String
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
**Returns**: String - The caption of the given image.
| Param | Type | Description |
| --- | --- | --- |
| image | \* | An element in the array of images. |
#### Lightbox.calculateImageDimensionLimits ⇒ Object
Calculate the max and min limits to the width and height of the displayed
image (all are optional). The max dimensions override the min
dimensions if they conflict.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
**Returns**: Object - May optionally contain the properties `minWidth`,
`minHeight`, `maxWidth`, and `maxHeight`.
| Param | Type | Description |
| --- | --- | --- |
| dimensions | Object | Contains the properties `windowWidth`, `windowHeight`, `imageWidth`, and `imageHeight`. |
#### Lightbox.calculateModalDimensions ⇒ Object
Calculate the width and height of the modal. This method gets called
after the width and height of the image, as displayed inside the modal,
are calculated.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
**Returns**: Object - Must contain the properties `width` and `height`.
| Param | Type | Description |
| --- | --- | --- |
| dimensions | Object | Contains the properties `windowWidth`, `windowHeight`, `imageDisplayWidth`, and `imageDisplayHeight`. |
#### Lightbox.isVideo ⇒ Boolean
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
**Returns**: Boolean - Whether the provided element is a video.
| Param | Type | Description |
| --- | --- | --- |
| image | \* | An element in the array of images. |
#### Lightbox.isSharedVideo ⇒ Boolean
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
**Returns**: Boolean - Whether the provided element is a video that is to be
embedded with an external service like YouTube. By default, this is
determined by the url not ending in `.mp4`, `.ogg`, or `.webm`.
| Param | Type | Description |
| --- | --- | --- |
| image | \* | An element in the array of images. |
#### Lightbox.images : Array
Array of all images to be shown in the lightbox (not `Image` objects).
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.index : Number
The index in the `Lightbox.images` aray of the image that is currently
shown in the lightbox.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.keyboardNavEnabled : Boolean
Whether keyboard navigation is currently enabled for navigating through
images in the lightbox.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.image : \*
The image currently shown in the lightbox.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.modalInstance : Object
The UI Bootstrap modal instance. See {@link
http://angular-ui.github.io/bootstrap/#/modal}.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.imageUrl : String
The URL of the current image. This is a property of the service rather
than of `Lightbox.image` because `Lightbox.image` need not be an
object, and besides it would be poor practice to alter the given
objects.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.imageCaption : String
The optional caption of the current image.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.loading : Boolean
Whether an image is currently being loaded.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.openModal ⇒ Object
Open the lightbox modal.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
**Returns**: Object - The created UI Bootstrap modal instance.
| Param | Type | Description |
| --- | --- | --- |
| newImages | Array | An array of images. Each image may be of any type. |
| newIndex | Number | The index in `newImages` to set as the current image. |
| modalParams | Object | Custom params for the angular UI bootstrap modal (in $uibModal.open()). |
#### Lightbox.closeModal : function
Close the lightbox modal.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
| Param | Type | Description |
| --- | --- | --- |
| result | \* | This argument can be useful if the modal promise gets handler(s) attached to it. |
#### Lightbox.setImage : function
This method can be used in all methods which navigate/change the
current image.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
| Param | Type | Description |
| --- | --- | --- |
| newIndex | Number | The index in the array of images to set as the new current image. |
#### Lightbox.firstImage : function
Navigate to the first image.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.prevImage : function
Navigate to the previous image.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.nextImage : function
Navigate to the next image.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.lastImage : function
Navigate to the last image.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
#### Lightbox.setImages : function
Call this method to set both the array of images and the current image
(based on the current index). A use case is when the image collection
gets changed dynamically in some way while the lightbox is still
open.
**Kind**: static property of [Lightbox](#bootstrapLightbox.Lightbox)
| Param | Type | Description |
| --- | --- | --- |
| newImages | Array | The new array of images. |
### bootstrapLightbox.lightboxSrc
This attribute directive is used in an `
` element in the
modal template in place of `src`. It handles resizing both the `
`
element and its relevant parent elements within the modal.
**Kind**: static class of [bootstrapLightbox](#bootstrapLightbox)